# Resumable uploads

> Big files and unreliable connections: the tus protocol, S3 multipart, and how an upload resumes.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://files.docs.sypnia.com/uploads/resumable-uploads/

For agents: Files resumable uploads: uploadResumable(path, file, {chunkSize, onProgress}) resumes after drops; protocols tus 1.0 at POST /upload/resumable (Uppy, tus-js-client, TUSKit) and S3 multipart via S3 API; resumable for 24 h; file and metadata row appear only on completion, policies checked at start and end; max file per plan up to 50 GB; parts 5–100 MB except last.

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.

```ts
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 connection
```

## Protocols

| Protocol                  | Endpoint                                              | For                                                                          |
| ------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------- |
| [tus 1.0](https://tus.io) | `POST /upload/resumable`                              | browsers and mobile apps; any tus client works (Uppy, tus-js-client, TUSKit) |
| S3 multipart              | the [S3 API](https://files.docs.sypnia.com/s3/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.
