Multipart Upload

Upload a large object in parts - the console uses this for files of 32 MiB and more.
EndpointMethodAdmin Required
/api/v1/objects/multipartPOSTNo
/api/v1/objects/multipart/partPUTNo
/api/v1/objects/multipart/completePOSTNo
/api/v1/objects/multipartDELETENo

Uploads one object as a series of independently sent parts, then assembles them server-side - the JSON counterpart of S3's multipart upload, for the console's own uploader. Parts can be sent in parallel and retried individually, and a browser never has to hold the whole file in memory. The console switches to this flow for files of 32 MiB and more; smaller files go through Upload Object.

All four calls identify the upload by the same query parameters. bucket and key are always required; key must name an object (no trailing /) and pass the usual key rules.

In a cluster, the state of an in-flight upload lives on one node. Every call is routed to that node transparently, so you can send the four requests to any node.

1. Create

POST /api/v1/objects/multipart?bucket={bucket}&key={key}[&contentType={type}]

bucket
string required
Name of the bucket. Must be owned by you.
key
string required
Full key of the object to create, including any folder prefix.
contentType
string
MIME type stored with the finished object. Default: application/octet-stream.

No request body.

Response

{
    "uploadId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "key": "videos/talk.mp4"
}

2. Upload a part

PUT /api/v1/objects/multipart/part?bucket={bucket}&key={key}&uploadId={uploadId}&partNumber={n}

The request body is the raw bytes of the part - no JSON, no form encoding. Parts are streamed to disk as they arrive.

uploadId
string required
The id returned by Create.
partNumber
integer required
Position of this part in the final object, 1…10000. Sending the same number twice replaces the earlier part.

Every part except the last must be at least 5 MiB; the last may be any size above zero. The minimum is checked at Complete, not here.

Response

{
    "partNumber": 3,
    "etag": "9b74c9897bac770ffc029102a200c5de"
}

Keep the etag of every part - Complete needs them.

3. Complete

POST /api/v1/objects/multipart/complete?bucket={bucket}&key={key}&uploadId={uploadId}

Request Body

parts
array required
Every uploaded part as { "partNumber": n, "etag": "..." }. At least one.
{
    "parts": [
        { "partNumber": 1, "etag": "d41d8cd98f00b204e9800998ecf8427e" },
        { "partNumber": 2, "etag": "9b74c9897bac770ffc029102a200c5de" }
    ]
}

Response

The finished object, in the same shape as a List Objects item:

{
    "key": "videos/talk.mp4",
    "size": 734003200,
    "contentType": "video/mp4",
    "etag": "a3c5f0e1b2d4c6e8f0a1b2c3d4e5f6a7-2",
    "lastModified": "2025-01-15T10:30:00Z",
    "isFolder": false,
    "versionId": "9f8e7d6c5b4a",
    "isLatest": true
}

The upload's parts are removed once the object is assembled. Webhook and replication rules fire for the finished object as for any upload.

4. Abort

DELETE /api/v1/objects/multipart?bucket={bucket}&key={key}&uploadId={uploadId}

Discards the upload and every part received so far. Returns 204 No Content.

Uploads that are neither completed nor aborted are removed automatically once they are older than ALARIK_MULTIPART_MAX_AGE_DAYS (default 7; 0 disables the sweep). Abort explicitly when you can - the parts occupy disk until then.

Errors

StatusReason
400Missing bucket, key or uploadId; invalid key; partNumber outside 1…10000; empty part body; parts empty on Complete; a part other than the last is under 5 MiB, or an ETag does not match the part received (Complete)
404Bucket not found (or not owned by you), or the upload does not exist / was opened for a different key
500Completing the upload failed