Skip to main content
POST
https://cdn.sacul.cloud
/
{bucketName}
/
{filepath}
Upload Files
curl --request POST \
  --url https://cdn.sacul.cloud/{bucketName}/{filepath} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "files": [
    {}
  ]
}
'
{
  "success": true,
  "url": "<string>",
  "key": "<string>"
}
This endpoint only accept multipart/form-data requests. Base64 was previously supported but is no longer recommended and will be deprecated in the future.

Query Headers

Authorization
string
required
Bearer token for authentication (e.g., Bearer <your-api-key>).
Content-Type
string
default:"multipart/form-data"
required
multipart/form-data

Query Parameters

bucketName
string
required
The name of the target bucket.
filepath
string
required
The destination path for the file (e.g., folder/image.png or folder/).
overwrite
boolean
default:"false"
If true, overwrites existing files at the specified path.
generateThumbnail
boolean
default:"false"
If true, generates a thumbnail for uploaded images. Thumbnail will be available at {bucketName}/{filepath}/filename_thumb.webp.
file
file
required
The file content to upload.
files
array
An array of files to upload.

Response

success
boolean
Indicates if the upload was successful.
url
string
The public URL of the uploaded file.
key
string
The file path/key in the bucket.

Examples

Standard Request
curl -X POST https://cdn.sacul.cloud/{bucketName}/{filepath} \
    -H "Authorization: Bearer <your-api-key>" \
    -F "file=@/path/to/your/file.jpg"
Batch Request
curl -X POST https://cdn.sacul.cloud/{bucketName}/{filepath} \
    -H "Authorization: Bearer <your-api-key>" \
    -F "files=@/path/to/your/file1.jpg" \
    -F "files=@/path/to/your/file2.jpg"