Skip to content

Request a presigned upload URL

POST
/api/v1/files/upload-url
curl --request POST \
--url https://app.avera.io/api/v1/files/upload-url \
--header 'Content-Type: application/json' \
--data '{ "fileName": "example", "contentType": "example", "fileSize": 1 }'

First step of the upload flow: validates the file name, size and content type, then returns a presigned URL the client uploads the bytes to directly with PUT. Confirm the upload afterwards to create the file record.

Media typeapplication/json
object
fileName
required
string
0 <= 255 characters
contentType
required
string
>= 1 characters
fileSize
required
integer format: int64
>= 1

Example generated

{
"fileName": "example",
"contentType": "example",
"fileSize": 1
}

OK

Media type*/*
object
uploadId
required
string
uploadUrl
required
string
headers
required
object
key
additional properties
string
expiresAt
required
string
contentType
required
string
maxSizeBytes
required
integer format: int64