Endpoint
Authentication
Requires authentication via Bearer token in theAuthorization header.
How It Works
- Send the first chunk with
Content-Rangestarting at byte 0 - Server responds with a
partialIdentifier - Send subsequent chunks with the same
partialIdentifier - Mark the last chunk with
X-Zipline-P-Lastchunk: true - Server processes the complete file asynchronously
Request
Multipart Form Data
Send one file chunk asmultipart/form-data. Only one file field is allowed per request.
Headers
Byte range of the current chunk in format:
bytes START-END/TOTAL.The first chunk must start at byte 0.
Original filename with extension.
MIME type of the complete file.
Total size of the complete file in bytes.
Partial upload identifier (provided by server after first chunk). Required for all chunks except the first.
Set to
true for the final chunk to trigger file processing.Additional Headers
All standard upload headers from/api/upload are supported and should be sent with the first chunk:
X-Zipline-FormatX-Zipline-Filename(override generated name)X-Zipline-File-ExtensionX-Zipline-DomainX-Zipline-Deletes-AtX-Zipline-PasswordX-Zipline-Max-ViewsX-Zipline-Original-NameX-Zipline-Folder
Response
Chunk Acknowledgement (all chunks except last)
Empty array until the last chunk.
Always
true for successful chunk upload.Unique identifier for this upload session (returned on first chunk only).
Final Response (last chunk)
Array containing the uploaded file object.
Unique file identifier.
Generated filename with extension.
MIME type of the file.
Full URL to access the file.
Set to
true - file is being processed asynchronously.Always
true for successful upload.ISO 8601 timestamp when file will be deleted, or
"never" if no expiration.Examples
First Chunk (1MB file in 2 chunks)
Second Chunk (middle chunk)
Final Chunk
Server-Side Processing
When the last chunk is received:- File metadata is created in the database
- Background worker combines all chunks
- File is uploaded to configured datasource
- Database is updated with final file size
- Webhooks are triggered (if configured)
pending: true).
Error Responses
400 Bad Request
- Missing required partial headers
- Invalid
Content-Rangeformat - Invalid or missing
partialIdentifier(after first chunk) - Multiple files in one request (only one allowed)
- Disabled file extension
- Invalid filename characters
403 Forbidden
- Folder not open for uploads
413 Payload Too Large
- Total file size exceeds
maxFileSizelimit - Upload would exceed user quota
Notes
The server caches partial upload state in memory. If the server restarts, you’ll need to start the upload from the beginning.
Temporary chunk files are stored in the server’s configured
tempDirectory with a prefix like zipline_partial_{identifier}_.File processing happens asynchronously after the last chunk. The file URL is returned immediately but may not be accessible for a few seconds.