Skip to main content

Direct File Upload

Upload local files directly to Rendi’s storage and run them through FFprobe. Bytes stream from your client straight to Rendi’s storage. Files up to 5 TB are supported. Use direct upload for local files. If your file is already at a publicly accessible URL, use /files/store-file instead — it will fetch and store the file from that URL.

Flow

1

Initialize

Call POST /v1/files/init-upload with filename and size_bytes. You get back a file_id, a part_size, and a list of upload_urls (one per part).
2

Upload parts

Split your file into chunks of exactly part_size bytes (the last chunk can be smaller). PUT each chunk directly to its corresponding URL in upload_urls. Collect the ETag response header from each PUT. Parts can be uploaded in parallel and retried independently.
3

Complete

Call POST /v1/files/{file_id}/complete-upload with the {part_number, etag} list. The uploaded bytes are now assembled into a single stored file.
4

FFprobe (automatic)

After completion, Rendi analyzes the file with FFprobe to extract media metadata (duration, dimensions, codec, mime type, bitrate, frame rate, etc.). The file’s status transitions from UPLOADED to STORED when analysis completes. Poll GET /v1/files/{file_id} to observe the transition.
If something goes wrong mid-upload, call POST /v1/files/{file_id}/abort-upload to discard the partial data.

Code Examples

Optional Parameters on init-upload

  • is_private: true — file lands in private storage. Requires downloading via presigned URL.
  • part_size: <bytes> — override the default part size. The server clamps to the valid range (5 MB minimum, 5 GB maximum) and to whatever’s needed to fit within 10,000 parts. The actually-used value is returned in part_size on the response.

Constraints

Errors

  • 400 on complete-upload: the upload session has expired or was aborted. Start a new upload with init-upload.
  • 400 on complete-upload / abort-upload: file is not in an upload-in-progress state (already completed, aborted, or the row is a different kind of file).
  • 403 on init-upload: your account plan does not support uploads (trial), or private storage was requested on a trial plan.
  • 403 on init-upload: size_bytes would exceed your storage quota.