Resumable uploads
Big files and unreliable connections: the tus protocol, S3 multipart, and how an upload resumes.
For files over a few megabytes, or from phones on mobile data, use resumable uploads: the file goes in parts, and if the connection drops the upload continues from the last part that arrived.
const upload = files.bucket('videos').uploadResumable('clase-01.mp4', file, {
chunkSize: 6 * 1024 * 1024,
onProgress: (sent, total) => setProgress(sent / total),
});
await upload.done; // resumes by itself after a dropped connectionProtocols
| Protocol | Endpoint | For |
|---|---|---|
| tus 1.0 | POST /upload/resumable | browsers and mobile apps; any tus client works (Uppy, tus-js-client, TUSKit) |
| S3 multipart | the S3 API | S3 tools and SDKs |
An unfinished upload can be resumed for 24 hours. Parts are stored as they arrive; the file and its metadata row appear only when the last part completes and the policies pass, which are checked when the upload starts and again when it ends.
Limits
The largest file depends on the plan, up to 50 GB. Parts are between 5 MB and 100 MB, except the last.