Skip to content

Upload a photo chunk

PATCH
/cms/photo/{file_id}
curl --request PATCH \
--url https://api.example.com/cms/photo/example \
--header 'Upload-Length: 1' \
--header 'Upload-Name: example' \
--header 'Upload-Offset: 1'

Uploads a chunk for a photo and assembles the file when complete. Max recommended chunk size is 10MB. When the upload is complete, the response will contain the details of the uploaded photo in JSON format. If the upload is still in progress, the response will contain the current filename being uploaded.

file_id
required
string

File ID returned from the create endpoint

Upload-Offset
required
integer

Byte offset for the chunk being uploaded

Upload-Length
required
integer

Total byte length of the file being uploaded

Upload-Name
required
string

Original filename of the uploaded file

Media typeapplication/octet-stream

Chunk accepted or upload complete

Media typeapplication/json
One of:

Chunk accepted, upload in progress

object
filename
string

Example generated

{
"filename": "example"
}

Invalid upload headers