Feedback

Get a presigned upload URL for a feedback attachment (MNE-1659)

Issues a presigned R2 PUT URL for a screenshot/screen-recording attachment and records a pending feedback_attachments row for it — the client uploads the bytes DIRECTLY to R2 with this URL (the worker never proxies them), then passes the returned attachment_id in POST /feedback's attachment_ids array to bind it to the real submission. No owner column exists on feedback_attachments yet, so ownership is stamped into the R2 object key namespace instead of a DB column. A row that is never bound (upload abandoned, or the follow-up POST /feedback never happens) is reclaimed by a sweep cron past a 1h grace window. Returns 503 if R2 presign credentials aren't provisioned for this env.

post/feedback/attachments/presign

Request

  • Base URL: https://api.mnemom.ai/v1
  • URL: https://api.mnemom.ai/v1/feedback/attachments/presign
  • Auth: one of:
    • HTTP bearer
    • API key in header X-Mnemom-Api-Key
    • API key in cookie mnemom_session

Request body

content_type'image/png' | 'image/jpeg' | 'image/webp' | 'video/webm' | 'video/mp4' required

MIME type of the attachment. Must match migration 397's feedback_attachments_content_type_ck exactly.

size_bytesinteger required

Declared size in bytes; 25MB cap. Advisory only — R2 does not enforce this against the actual PUT.

Response

Presigned upload URL issued.

attachment_idstring uuid required

Pass this in POST /feedback's attachment_ids to bind it.

upload_urlstring uri required

Presigned R2 PUT URL. PUT the raw bytes here directly.

method'PUT' required
headersobject required

Headers the client must send with the PUT (Content-Type).

expires_ininteger required

Seconds until the presigned URL expires.

Changes

No recorded changes to this operation across all 1 revision of this API.