Upload a file or create resumable session
Changed onUnified endpoint for file uploads. Behavior depends on Content-Type and headers:
Simple Upload (multipart/form-data): Upload a complete file in a single request. Best for files under 100MB.
Create Resumable Session (application/json): Create a session for chunked uploads. Best for large files or unreliable networks. Requires: Content-Type: application/json with body {"filename": "...", "content_type": "...", "total_size": ...}
Complete Resumable Session: Complete a session after all parts are uploaded. Requires: X-Upload-Session header with session ID and X-Upload-Complete: true header.
Resumable Session Ownership: A session created with a user access token remains bound to that user. A session created with an anon key remains bound to that exact anon key. Reuse the same identity or anon key for part uploads, status, completion, and abort requests; an ownership mismatch returns 404.
Request
- Base URLhttps://api.volcano.dev
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
Storage bucket name
Object path within bucket
Headers
Upload session ID (for completing resumable uploads)
Set to "true" to complete a resumable upload session
Request body
Request to create a resumable upload session
Target file path within the bucket
MIME type of the file
Total file size in bytes (max 5TB)
Part size in bytes (default: 25MB, min: 5MB, max: 25MB)
Example request
{
"object_path": "videos/large-file.mp4",
"content_type": "video/mp4",
"total_size": 5368709120,
"part_size": 26214400
}Response
Resumable upload completed (when X-Upload-Complete=true)
Response when completing an upload
Changes
- breaking
added the new path request parameter
bucketName - breaking
added the new required request property
content_type - breaking
added the new required request property
object_path
26 more changes in this revision
- breaking