For large files, Vaulx exposes an S3 multipart upload API that lets the client break a file into parts and upload each one directly to S3 using a per-part presigned URL. The client creates an upload session, fetches a presigned URL for each part, PUTs the raw bytes for that part directly to S3, collects theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/noelzappy/vaulx/llms.txt
Use this file to discover all available pages before exploring further.
ETag returned by each PUT, then calls the complete endpoint. The Vaulx server is never in the data path — only the signaling endpoints (create, presign, complete, abort) pass through it.
The create, abort, and complete endpoints require an authenticated session with the editor or admin role. The list parts and presign part endpoints require only a valid authenticated session.
S3 key format
Multipart upload keys are namespaced underuploads/ and partitioned by year and month:
uploads/2024/01/a1b2c3d4e5f6a1b2/large-video.mp4
The <16-hex-bytes> segment is a random 8-byte value encoded as hex to prevent collisions between files of the same name. Filename sanitization follows the same rules as the single-file upload API: non-alphanumeric characters (except ., -, and _) are replaced with _.
Endpoints
POST /api/s3/multipart — Create multipart upload
Initiates an S3 multipart upload session and creates apending file record in the database. Returns the S3 uploadId, the generated object key, and the Vaulx fileId — all three are required for subsequent calls.
Request body
Original filename of the file being uploaded. Used to construct the S3 object key after sanitization, and stored as the display name in the database.
MIME type of the file (e.g.
video/mp4, application/zip). Passed directly to the S3 CreateMultipartUpload call as the object’s Content-Type. If omitted, application/octet-stream is used by the client.UUID of the destination folder. Omit or pass an empty string to place the file at the root level.
The S3 multipart upload ID. Pass this as the
{uploadId} path parameter in all subsequent requests for this upload session.The full S3 object key for this upload. Pass this as the
key query parameter or in the request body in all subsequent requests.The Vaulx UUID of the pending file record. Pass this in the complete request body so the server can activate the file record once S3 assembly finishes.
GET /api/s3/multipart/?key= — List uploaded parts
Returns the list of parts that S3 has already received for the given upload session. Use this to resume an interrupted upload — compare the returned part numbers against the parts you intended to upload and skip any that are already present. Path parameter| Parameter | Type | Description |
|---|---|---|
uploadId | string | S3 multipart upload ID |
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | S3 object key |
PartNumber (1-based integer) and ETag (the entity tag returned by S3 for that part’s PUT). Returns an empty array [] if no parts have been uploaded yet.
GET /api/s3/multipart//?key= — Presign a part
Returns a short-lived presigned PUT URL for a single part. The client PUTs the raw bytes for that part directly to the returned URL. S3 responds with anETag header — save this value; it is required in the complete request.
Path parameters
| Parameter | Type | Description |
|---|---|---|
uploadId | string | S3 multipart upload ID |
partNumber | integer | Part number (1-based). The last part may be smaller than the others. |
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | S3 object key |
Presigned PUT URL for this part. Valid for 1 hour. PUT the raw bytes for this part to this URL. The S3 response will include an
ETag header — store it alongside the part number for use in the complete call.DELETE /api/s3/multipart/?key= — Abort multipart upload
Cancels the multipart upload session and instructs S3 to discard all parts that have already been uploaded. Call this if the user cancels the upload or if an unrecoverable error occurs, to avoid leaving orphaned part data in the bucket. Path parameter| Parameter | Type | Description |
|---|---|---|
uploadId | string | S3 multipart upload ID |
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | S3 object key |
204 No Content on success. Any error from S3 is silently swallowed — the endpoint will still return 204 even if the underlying abort call fails, so clients should not rely on this response to confirm S3-side cleanup.
POST /api/s3/multipart//complete — Complete multipart upload
Tells S3 to assemble all uploaded parts into the final object, then activates the Vaulx file record. The server setsstatus = 'active' and size_bytes to the reported size, and writes a file.upload audit log entry.
Path parameter
| Parameter | Type | Description |
|---|---|---|
uploadId | string | S3 multipart upload ID |
The S3 object key returned by the create endpoint. Must exactly match the key used for all previous part uploads.
The Vaulx file UUID returned by the create endpoint. Used to look up and activate the pending file record in the database.
Total size of the assembled file in bytes. Stored as
size_bytes on the file record. This should equal the sum of all part sizes.Ordered array of completed parts. Each object must contain
PartNumber (integer, 1-based) and ETag (the exact string returned by S3 in the ETag response header for that part’s PUT, including surrounding quotes). Parts must be listed in ascending PartNumber order.The S3-reported URL of the assembled object. This is the canonical S3 location of the completed file.
Full flow example
The following shell script demonstrates the complete multipart upload flow for a 20 MB file split into two 10 MB parts.Each part — except the very last one — must be at least 5 MB (5,242,880 bytes). This is an S3 protocol requirement: S3 will reject a complete request if any non-final part is smaller than 5 MB. A minimum chunk size of 10 MB is recommended to stay safely above this limit.