Chunked & Multipart Uploads

For large files up to 10 GB on Business (video reels, database archives, RAW photo batches), Elept provides an S3-compatible chunked multipart upload workflow. This allows uploading files in resilient 5MB parts with automatic retry safety (standard single-request POST uploads via /api/v1/files are capped at 128 MB by server limits).

Multipart Workflow Overview

  1. Initiate Multipart Upload: Call POST /api/v1/uploads/multipart/initiate with file metadata to acquire an upload_id and object_key.
  2. Sign Parts: For each 5MB chunk (part 1 to N), request a presigned PUT URL via POST /api/v1/uploads/multipart/sign-part.
  3. Direct PUT: Send the binary chunk directly to the presigned storage URL using HTTP PUT. Record the returned ETag header.
  4. Complete Multipart: Call POST /api/v1/uploads/multipart/complete with all part numbers and ETags to assemble the file.

1. Initiate Multipart Upload

POST /api/v1/uploads/multipart/initiate
Authorization: Bearer el_live_your_api_key
Content-Type: application/json

{
    "filename": "backup-2026-10-21.tar.gz",
    "mime_type": "application/gzip",
    "visibility": "private",
    "size": 1048576000
}

Response (HTTP 200):

{
    "success": true,
    "upload_id": "mp_9a8b7c6d5e...",
    "file_uid": "file_8f1a2b3c4d5e",
    "object_key": "f/file_8f1a2b3c4d5e.tar.gz",
    "part_size": 5242880,
    "sign_part_url": "/api/v1/uploads/multipart/sign-part",
    "complete_url": "/api/v1/uploads/multipart/complete",
    "abort_url": "/api/v1/uploads/multipart/abort"
}

2. Sign & Upload Each Part

POST /api/v1/uploads/multipart/sign-part
Authorization: Bearer el_live_your_api_key
Content-Type: application/json

{
    "object_key": "f/file_8f1a2b3c4d5e.tar.gz",
    "upload_id": "mp_9a8b7c6d5e...",
    "part_number": 1
}

Response gives an authentic signed URL to PUT binary chunk data directly:

{
    "success": true,
    "part_number": 1,
    "upload_id": "mp_9a8b7c6d5e...",
    "signed_url": "https://cdn.elept.com/f/file_8f1a2b3c4d5e.tar.gz?partNumber=1&uploadId=mp_...",
    "method": "PUT"
}

3. Complete Multipart Upload

POST /api/v1/uploads/multipart/complete
Authorization: Bearer el_live_your_api_key
Content-Type: application/json

{
    "object_key": "f/file_8f1a2b3c4d5e.tar.gz",
    "upload_id": "mp_9a8b7c6d5e...",
    "file_uid": "file_8f1a2b3c4d5e",
    "filename": "backup-2026-10-21.tar.gz",
    "size": 1048576000,
    "parts": [
        { "part_number": 1, "etag": "\"d41d8cd98f00b204e9800998ecf8427e\"" },
        { "part_number": 2, "etag": "\"a1b2c3d4e5f60718293a4b5c6d7e8f90\"" }
    ]
}

4. Aborting Failed Uploads

If an upload is cancelled, call POST /api/v1/uploads/multipart/abort with upload_id and object_key to free pending storage chunks.

← Standard Upload Next: Error Codes →