Problem
ClawChat routes all data through a single WebSocket message, which is subject to the gateway maxPayload limit (default 1MB). Large files (e.g. PDFs, images) hit this limit and fail.
The webchat UI sidesteps this by uploading files via a separate HTTP multipart endpoint, which is not subject to the same WebSocket payload cap.
Proposed Solution
Add HTTP multipart upload support to ClawChat:
- Confirm the gateway exposes a multipart upload endpoint (same one webchat uses)
- Detect large files — if attachment exceeds a threshold (e.g. 512KB), route via HTTP instead of WebSocket
- Auth — pass the same bearer token on the HTTP request
- File reference — receive a file reference/ID back from the upload endpoint and include it in the message payload instead of raw base64
Outcome
ClawChat can handle PDFs and other large attachments on par with the webchat UI.
Notes
- Needs gateway endpoint documentation/confirmation first
- Should be transparent to the user — no UX change, just works for larger files
Problem
ClawChat routes all data through a single WebSocket message, which is subject to the gateway
maxPayloadlimit (default 1MB). Large files (e.g. PDFs, images) hit this limit and fail.The webchat UI sidesteps this by uploading files via a separate HTTP multipart endpoint, which is not subject to the same WebSocket payload cap.
Proposed Solution
Add HTTP multipart upload support to ClawChat:
Outcome
ClawChat can handle PDFs and other large attachments on par with the webchat UI.
Notes