Skip to main content
POST
Mint a signed PUT URL for a screenshot attachment (C-FBSA2)

Body

application/json

Request body for POST /v1/feedback/attachments/upload-url (C-FBSA2).

The dashboard submits filename/mime/bytes; the server pre-validates the MIME + size against the C-FBSA1 caps and mints a Supabase Storage signed PUT URL. The original filename is not persisted server-side - it is only used for client-side display per C-FBSA3 step 2.

Both this field and :class:AttachmentRef.mime derive from ALLOWED_MIME_LITERAL in engine.feedback.attachments.limits - a single edit to that tuple propagates everywhere (D-FBSA4: PNG/JPEG only, narrower than ttrpg-maps).

Design references: docs/design/concepts/feedback-screenshot-attachments/design.md § C-FBSA2 docs/design/concepts/feedback-screenshot-attachments/decisions.md § D-FBSA3 docs/design/concepts/feedback-screenshot-attachments/decisions.md § D-FBSA4 docs/design/concepts/feedback-screenshot-attachments/decisions.md § D-FBSA5

filename
string
required

Client-supplied filename - displayed only on the dashboard. Server discards per C-FBSA3 step 2; the durable storage_key is the only identity downstream.

Maximum string length: 80
mime
enum<string>
required

MIME type - must match AttachmentRef.mime (D-FBSA4: PNG/JPEG only).

Available options:
image/png,
image/jpeg
bytes
integer
required

Pre-upload byte size (≤ 2 MB per D-FBSA1).

Required range: 1 <= x <= 2097152

Response

Signed upload URL minted

Response body for POST /v1/feedback/attachments/upload-url (C-FBSA2).

The dashboard receives:

  • storage_key: the durable key the customer must echo back in the subsequent POST /v1/feedback context.attachments[].storage_key field. Shape enforced by :class:AttachmentRef.
  • upload_url: the Supabase Storage signed PUT URL.
  • expires_at: ISO 8601 timestamp of URL expiry (~2h fixed by Supabase createSignedUploadUrl per R2 research - not configurable).

Design references: docs/design/concepts/feedback-screenshot-attachments/design.md § C-FBSA2 docs/design/concepts/feedback-screenshot-attachments/decisions.md § D-FBSA3

storage_key
string
required

Durable storage key the customer echoes back in attachments[]. Shape: feedback-attachments/tenant_///.(png|jpg|jpeg)

upload_url
string
required

Signed PUT URL the browser uploads bytes to.

expires_at
string
required

ISO 8601 expiry timestamp (~2h fixed by Supabase SDK).