-
Notifications
You must be signed in to change notification settings - Fork 8
Description
[Enhancement] Enforce 5MB Image Upload Limit
📋 Description
Implement 5MB file size limit specifically for image uploads while maintaining 150MB limit for other file types. Prevent oversized images at upload time rather than failing at LLM call.
🎯 User Story
As a user uploading images to chat
I want clear feedback when my image exceeds the size limit
So that I can resize it before sending rather than getting cryptic errors
💼 Business Value
- Better UX: Prevent uploads upfront instead of failing at LLM call
- Clear Messaging: No more "Internal SDK Error" for oversized images
- Cross-Model Compatibility: 5MB works with all LLM providers (Anthropic, OpenAI, etc.)
🔑 Requirements
File Size Limits
| File Type | Max Size |
|---|---|
| Images (.jpg, .jpeg, .png, .gif, .webp, .svg, .bmp) | 5MB |
| All other files | 150MB (unchanged) |
Limit Scope
- Per image: Each individual image limited to 5MB
- Per conversation: No limit (unchanged)
- Other files: Keep existing 150MB limit
Upload Methods Affected
- File picker upload
- Drag & drop
- Copy/paste
- All image upload entry points
Existing Limitations
- Keep all current file type restrictions
- Keep all current conversation attachment limits
- No changes to non-image file handling
✅ Acceptance Criteria
AC1: Image Upload Blocked at 5MB
Given I try to upload an image larger than 5MB
When I use any upload method (picker, drag/drop, paste)
Then upload is blocked immediately
And I see error: "Image exceeds 5 MB limit. Please resize and try again."
AC2: Multiple Images Validation
Given I upload multiple images at once
When some images exceed 5MB
Then only oversized images are rejected
And valid images proceed normally
And error lists rejected files: "The following images exceed 5 MB limit: [filename1.jpg, filename2.png]"
AC3: Other Files Unchanged
Given I upload a non-image file (PDF, DOCX, etc.)
When the file is under 150MB
Then upload proceeds normally
And 5MB limit does not apply
AC4: Regenerate with Oversized Image
Given a conversation has an existing image over 5MB (legacy)
When I try to regenerate the message
Then I see error: "Image exceeds 5 MB limit. Please remove or replace the image."
🎨 Error Messages
Single Image Upload
⚠️ Image exceeds 5 MB limit. Please resize and try again.
File: screenshot.png (13.2 MB)
Multiple Images
⚠️ The following images exceed 5 MB limit:
• large_photo.jpg (8.5 MB)
• screenshot.png (13.2 MB)
Please resize and try again.
Regenerate Attempt
⚠️ Image exceeds 5 MB limit. Please remove or replace the image to continue.
📌 Notes
- No migration needed for existing conversations
- Legacy oversized images remain but will fail on regenerate
- 5MB aligns with Anthropic's limit (strictest among providers)
- Validation happens client-side for immediate feedback
🔗 Related
- Bug: Generic "Internal SDK Error" for Anthropic 5MB limit - [BUG] Generic "Internal SDK Error" displayed when uploading images exceeding 5MB limit for Anthropic models #3622
- Anthropic API limit: 5MB per image
- Stage example: conversation [BUG] Incorrect Sorting of Tools in Dropdown List for "Function" Node #948
Metadata
Metadata
Assignees
Labels
Type
Projects
Status