Storage Objects

Upload a file or create resumable session

Changed on

Unified 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.

post/storage/{bucketName}/{path}

Request

  • Base URL: https://api.volcano.dev
  • URL: https://api.volcano.dev/storage/{bucketName}/{path}
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

bucketNamestring required

Storage bucket name

pathstring required

Object path within bucket

Headers

X-Upload-Sessionstring

Upload session ID (for completing resumable uploads)

X-Upload-Complete'true'

Set to "true" to complete a resumable upload session

Request body

object_pathstring required

Target file path within the bucket

content_typestring required

MIME type of the file

total_sizeinteger required

Total file size in bytes (max 5TB)

part_sizeinteger

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)

Changes

    • ▲

      added the new path request parameter bucketName

    • ▲

      added the new required request property

    • ▲

      added the new required request property

    • ▲

      added the new required request property

    • ▲

      the request's body type changed from no type to object

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the response's body type changed from no type to object for status

    • ▲

      the /// response's property type changed from no type to object for status

    • ▲

      the /// response's property type changed from no type to object for status

    • ○

      added the new optional request property

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the optional property //// to the response with the status

    • ○

      added the required property to the response with the status

    • ○

      added the required property //// to the response with the status

    • ○

      added the required property //// to the response with the status

    • ○

      added the required property //// to the response with the status

    • ○

      added the required property //// to the response with the status

    • ○

      added the required property //// to the response with the status

    • ○

      added the required property //// to the response with the status

    • ○

      added the non-success response with the status