package requests // PresignUploadRequest is the body for POST /api/uploads/presign. The client // describes what it's about to upload; the server validates against quota, // rate limits, and per-category caps before returning a signed POST policy. type PresignUploadRequest struct { // Category gates allowed mime types and the size cap. One of: // "completion" — task completion photos // "document_image" — image attached to a Document // "document_file" — file (e.g. PDF) attached to a Document Category string `json:"category" validate:"required,oneof=completion document_image document_file"` // ContentType is the MIME type the client will upload (e.g. image/jpeg). // Bound to the policy so the actual upload must match exactly. ContentType string `json:"content_type" validate:"required,min=3,max=127"` // ContentLength is the exact byte count the client intends to upload. // The signed policy permits a small slack window around this value // (server-side constant) so the client can encode in one pass without // having to predict the byte count perfectly. ContentLength int64 `json:"content_length" validate:"required,min=1"` }