Upload a portal session file
Uploads the multipart file and returns its final public URL/key. Active HTML, JavaScript, XML and SVG content/extensions are rejected. HEIC/HEIF images are converted to JPEG, so use the returned key and filename. Storage or receipt failures return500; invalid files, MIME/key mismatches or conversion failures return422. Requires a current donor/recipient portal session in the URL, or the matching public-add-recipient upload session. Only approved generated basenames, matching entity image keys and trip-task-completions UUID keys are allowed. Valid sessions refresh their lifetime to one hour. Recipient sessions with valid workspace/program/recipient/user context receive an upload_receipt for a subsequent recipient message.
Path Parameters
Client id in the current organization.
Opaque donor or recipient portal session token.
Body
Validated request fields for this operation.
Multipart file. Deployed PHP upload/post limits apply; direct images are additionally limited to50MiB and donation attachments to10MiB.
Permitted storage object key. URL-decoded and trimmed; empty, control characters, backslashes and dot/path-traversal segments are rejected.
1024"550e8400-e29b-41d4-a716-446655440000.jpg"
Optional declared MIME type; must match detected content except validated CSV/plain-text and HEIC compatibility cases.
191"image/jpeg"
Response
Operation result.
HTTP contracts traced from the deployed controller and delegated validation/serialization.
"success"
Final stored key; HEIC conversion can change the extension.
"550e8400-e29b-41d4-a716-446655440000.jpeg"
Stored MIME type.
"image/jpeg"
Original filename, adjusted when converted.
"photo.jpeg"
Whether the original HEIC/HEIF was converted to JPEG.
false
Public file URL.
"https://cdn.example.org/photo.jpeg"
Recipient-session attachment receipt UUID when eligible. Expires after60minutes and is bound to that session, record and key.