Version: 2.0.23
Describe the Bug
A 23.3 MB PNG (5120x5120, produced by ComfyUI) cannot be attached. The DevTools console shows:
Failed to read dropped image F:\...\ComfyUI_20260807-055037_00001_.png TypeError: Failed to fetch
The same failure occurs through the file picker (Failed to read file: TypeError: Failed to fetch), since both paths go through readImageAttachmentFromPath.
I narrowed it down in the DevTools console:
const r = await fetch('http://asset.localhost/' + encodeURIComponent(path));
r.status // 200
r.headers.get('content-length') // 24449006
await r.blob() // Uncaught TypeError: Failed to fetch
The request itself succeeds and the correct content-length comes back — the failure happens while reading the response body. Images under 10 MB attach without any problem.
Separately, the message shown to the user is "Invalid file type (only JPEG, JPG, PNG, WEBP allowed)", because the catch in prepareImageAttachmentsFromPaths routes every read failure into invalidType. The file is a plain .png, so this message sent me looking in entirely the wrong direction. Surfacing the actual error, or at least a distinct "failed to read" case, would help a lot.
Steps to Reproduce
- Prepare a PNG larger than ~20 MB (mine is 5120x5120, 23.3 MB).
- Drag and drop it onto the chat input, or attach it via the file picker.
- The attachment is rejected with "Invalid file type", and the console logs
TypeError: Failed to fetch.
Screenshots / Logs
Operating System
Related: #262
Version: 2.0.23
Describe the Bug
A 23.3 MB PNG (5120x5120, produced by ComfyUI) cannot be attached. The DevTools console shows:
The same failure occurs through the file picker (
Failed to read file: TypeError: Failed to fetch), since both paths go throughreadImageAttachmentFromPath.I narrowed it down in the DevTools console:
The request itself succeeds and the correct content-length comes back — the failure happens while reading the response body. Images under 10 MB attach without any problem.
Separately, the message shown to the user is "Invalid file type (only JPEG, JPG, PNG, WEBP allowed)", because the
catchinprepareImageAttachmentsFromPathsroutes every read failure intoinvalidType. The file is a plain.png, so this message sent me looking in entirely the wrong direction. Surfacing the actual error, or at least a distinct "failed to read" case, would help a lot.Steps to Reproduce
TypeError: Failed to fetch.Screenshots / Logs
Operating System
Related: #262