v1
latestOpenAPI 3.0.32026-07-26172157253.6 KBClient
Get Upload Strategy (Direct or Presigned URL)
Returns upload strategy based on storage backend (S3 returns presigned URLs, local returns direct upload endpoints).
The filename is used verbatim as the object key. Uploading to an existing key replaces the current object in place. To upload with a server-generated unique key instead, use POST /api/storage/buckets/{bucketName}/objects. End-user creates and replacements are gated by the storage.objects row-level-security policies.
post/api/storage/buckets/{bucketName}/upload-strategy
Path parameters
bucketNamestring required
Request body
Example request
{
"filename": "profile-photo.jpg",
"contentType": "image/jpeg",
"size": 102400
}Response
Upload strategy details
Example response
{
"method": "presigned",
"uploadUrl": "https://s3-bucket.amazonaws.com/",
"fields": {
"bucket": "my-s3-bucket",
"key": "app-key/avatars/profile.jpg",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256"
},
"key": "profile-photo.jpg",
"confirmRequired": true,
"confirmUrl": "/api/storage/buckets/avatars/objects/profile.jpg/confirm-upload",
"expiresAt": "2025-09-05T01:00:00Z"
}