Complete Portfolio Asset Upload
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.
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
application/json
curl -X POST "https://example.com/api/v1/portfolio-assets/complete" \ -H "Content-Type: application/json" \ -d '{ "assetId": "string" }'{ "success": true, "message": "string", "data": { "id": "string", "url": "string" }}Create Portfolio Asset Upload URLPOST
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.
Delete Portfolio AssetDELETE
Deletes the R2 object and its metadata row. `data` is `null` on success. Session-authenticated only. This does not rewrite any portfolio that still references the asset — remove the reference and save the draft first, or publishing will fail with `400`.