Uploads
Issue a presigned PUT URL for direct-to-R2 media uploads
Mobile clients upload media directly to R2 instead of proxying through the origin. Server picks the storage key under uploads/{user_id}/{uuid}.{ext} — clients cannot supply a key.
post/uploads/presign
Request
- Base URL: https://www.sociahive.com/api/v1
- URL: https://www.sociahive.com/api/v1/uploads/presign
- Auth: one of:
- API key in header X-API-Key
- OAuth 2 (authorization code, authorization URL /api/oauth/authorize, token URL /api/oauth/token, scopes: uploads:write)
Request body
Example request
{
"filename": "IMG_4823.jpg",
"size_bytes": 5242880
}Response
Presigned upload URL
Example response
{
"key": "uploads/6f1c.../0b8e1a2c-6a43-4f7e-9c2d-1b7f0c9d3a11.jpg",
"required_headers": {
"Content-Type": "image/jpeg",
"Content-Length": "5242880",
"Content-Disposition": "attachment"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.