Create Portfolio Asset Upload URL
Issues a presigned Cloudflare R2 PUT URL (10-minute expiry) for a JPG, PNG, or WebP image up to 5MB. Upload the file directly to `uploadUrl` with a matching Content-Type/Content-Length, then call `POST /portfolio-assets/complete` to verify and activate it. Session-authenticated only.
Internal session cookie for local development.
In: cookie
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/portfolio-assets/upload-url" \ -H "Content-Type: application/json" \ -d '{ "kind": "AVATAR", "mimeType": "image/png", "sizeBytes": 204800 }'{ "success": true, "message": "string", "data": { "assetId": "string", "uploadUrl": "string", "expiresInSeconds": 600 }}Portfolio Assets
Presigned image uploads for portfolio avatars, project covers, and social images.
Complete Portfolio Asset UploadPOST
Verifies an uploaded asset with a server-side HEAD request against R2 (confirming size, content type, and optional checksum match what was declared) and marks it `READY` so it can be referenced from a portfolio. Session-authenticated only.