Skip to main content

Module attachments

Module attachments 

Source
Expand description

HTTP side of image attachments (docs/specs/SPEC_AGENT_PANE_IMAGE_ATTACHMENTS_2026_09_26.md §6.2, §6.5):

  • GET /api/v1/attachments/:id/:kind — serve original, thumb or send.
  • POST /api/v1/attachments/upload?name= — the paste fallback: the raw body is one image, streamed to disk and hashed as it arrives.

Both sit in authed_routes, so they need X-AuthKey.

Structs§

UploadQuery 🔒

Functions§

error 🔒
handle_attachment_file 🔒
GET /api/v1/attachments/:id/:kind. The original is immutable by hash; thumb and send-copy change with the transform fingerprint, so everything is no-cache with an ETag of <id>-<fp> and a 304 on a match.
handle_attachment_upload 🔒
POST /api/v1/attachments/upload?name= — body is one image file. → 200 AttachmentInfo · 400 empty · 413 over the per-file cap · 415 not a supported image · 500 I/O.
service 🔒