fix(upload): increase attachment size limit to 50mb (#144)
* fix(upload): increase attachment size limit to 50mb Raises body limits in web proxy and desktop app. Adds client-side size checks and better 413 error handling. * fix(client): auto-compress large images to avoid server body limits Adds client-side compression for images >1MB. Resizes to max 2048px and converts large PNGs to JPEG. Adds detailed logging for debugging. * chore: remove debug logs from client and proxy
This commit is contained in:
committed by
GitHub
parent
5ffec2acba
commit
c4fb9d5730
@@ -519,6 +519,14 @@ export const ChatInput: React.FC<ChatInputProps> = ({ onOpenSettings, scrollToBo
|
||||
normalized.includes('gateway timeout') ||
|
||||
normalized === 'failed to send message';
|
||||
|
||||
if (normalized.includes('payload too large') || normalized.includes('413') || normalized.includes('entity too large')) {
|
||||
toast.error('Attachments are too large to send. Please try reducing the number or size of images.');
|
||||
if (allAttachments.length > 0) {
|
||||
useFileStore.setState({ attachedFiles: allAttachments });
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (isSoftNetworkError) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user