Skip to content

feat: multipart HTTP upload for large file attachments #16

@ngmaloney

Description

@ngmaloney

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:

  1. Confirm the gateway exposes a multipart upload endpoint (same one webchat uses)
  2. Detect large files — if attachment exceeds a threshold (e.g. 512KB), route via HTTP instead of WebSocket
  3. Auth — pass the same bearer token on the HTTP request
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions