Skip to main content
POST
Get Upload Strategy (Direct or Presigned URL)

Authorizations

x-api-key
string
header
required

Path Parameters

bucketName
string
required
Pattern: ^[a-zA-Z0-9_-]+$

Body

application/json
filename
string
required

Original filename for generating unique key

Example:

"profile-photo.jpg"

contentType
string

MIME type of the file

Example:

"image/jpeg"

size
integer

File size in bytes

Example:

102400

Response

Upload strategy details

method
enum<string>
required

Upload method - presigned for S3, direct for local storage

Available options:
presigned,
direct
Example:

"presigned"

uploadUrl
string
required

URL to upload the file to

Example:

"https://s3-bucket.amazonaws.com/"

key
string
required

Generated unique key for the file

Example:

"profile-photo-1234567890-abc123.jpg"

confirmRequired
boolean
required

Whether upload confirmation is required

Example:

true

fields
object

Form fields for presigned POST (S3 only)

Example:
confirmUrl
string

URL to confirm the upload (if confirmRequired is true)

Example:

"/api/storage/buckets/avatars/objects/profile.jpg/confirm-upload"

expiresAt
string<date-time>

Expiration time for presigned URL (S3 only)

Example:

"2025-09-05T01:00:00Z"