You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attachments stop at 8 MB; a larger file needs a higher limit or another upload path #445
A file attached in the composer, or pasted or dropped on the terminal, is refused above 8 MB: MAX_IMAGE_BYTES in server/paste.ts, answered as 413 image_too_large. The comment beside the number explains it by screenshots ("screenshots land in the 0.1-2MB range; 8MB leaves headroom"), but the route now stores any kind of file under its own name, so the limit is met by ordinary files: an archive, a PDF, a recording.
A 107 MB zip showed only /api/pane/image failed (413):, with no reason after the colon. That answer did not come from the route:
The upload is the whole file as base64 inside a JSON body, about 4/3 of the file's size.
The server sets no maxRequestBodySize, so Bun's default of 128 MB applies, and Bun answers 413 with an empty body before the route runs.
Measured on Bun 1.4.2 with a scratch server and the same body shape: a 90 MB file (120.0 MB body) reached the handler; a 107 MB file (142.7 MB body) got 413 with an empty body and the handler was never called.
A separate PR makes the browser check the size before it uploads and say what the limit is. This issue is about the limit itself.
Options
Raise the number and keep the transport. Every upload is read whole in the browser, encoded, parsed as JSON on the server and decoded again, so the file sits in memory several times on both sides. That is fine for some tens of MB. A file of about 96 MB is the ceiling whatever the number says, unless maxRequestBodySize is raised with it.
A streaming upload: the bytes as the request body (or multipart) to a route that writes them to disk as they arrive. That removes the ceiling and the copies. It is a new route, so it needs a contract test, an answer in the demo transport, an entry in the remote-PC proxy's allowlist, and probably progress and cancel in the composer.
Keep 8 MB and say so in the guide.
To decide
How large a file should be attachable. The case that raised this was a 107 MB zip.
Whether a remote PC gets the same limit: there the upload goes through the connection server and its bridge.
Activity
devswha commentedon Oct 5, 2026
The size check before the upload, and its message, are in #446.
fix(composer): say a file is too large before uploading it (#446)
fix(attachments): attach files up to 32 MB and always answer an overs…