---
title: "Make large uploads resumable · Agent Wranglers"
url: https://agentwranglers.se/playbook/files-and-media/uploads/resumable-uploads
id: MED-42
level: Recommended
updated: 2026-10-22
build: a2a6bdfed830
tokens: 931
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Make large uploads resumable

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Uploads](https://agentwranglers.se/playbook/files-and-media/uploads.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-22.

- ID: MED-42
- Level: Recommended
- Chapter: [Uploads](https://agentwranglers.se/playbook/files-and-media/uploads.md)
- Rule: Let any upload over 100 MB, or any upload from a phone, continue from the last received byte after a dropped connection.
- Check: Start a 500 MB upload, cut the network at 50 percent and reconnect. The upload finishes without sending the first half again, and the stored file's SHA-256 matches the original.
- How: Use an open protocol rather than your own. The tus protocol 1.0 is stable and has clients and servers for most languages. The IETF draft for resumable uploads (draft-ietf-httpbis-resumable-upload, version 14 in October 2026) is still a draft, not an RFC. It adds the `104` interim response and the `Upload-Offset` and `Upload-Complete` headers. Object storage multipart uploads also work, with parts of at least 5 MiB and at most 10,000 parts on S3. Retry with growing waits, such as 0, 1, 3 and 10 seconds. Set a chunk size only when a proxy limits the body size. When the last part arrives, [confirm the upload on the server](https://agentwranglers.se/playbook/files-and-media/uploads/confirm-uploads.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
import * as tus from 'tus-js-client';

export function uploadSiteSurvey(file, token) {
  const upload = new tus.Upload(file, {
    endpoint: 'https://uploads.example.com/files/',
    headers: { Authorization: `Bearer ${token}` },
    retryDelays: [0, 1000, 3000, 10000],
    metadata: { filename: file.name, filetype: file.type },
  });
  upload.findPreviousUploads().then(previous => {
    if (previous.length > 0) upload.resumeFromPreviousUpload(previous[0]);
    upload.start();
  });
}
```

### Python example

```python
from tusclient import client

def upload_site_survey(path: str, token: str) -> str:
    tus = client.TusClient("https://uploads.example.com/files/", headers={"Authorization": f"Bearer {token}"})
    uploader = tus.uploader(path, retries=5, retry_delay=3)
    uploader.upload()
    return uploader.url
```

## Sources

- [IETF draft on Resumable Uploads for HTTP](https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/)

## Related rules

- MED-43 [Confirm every upload on the server](https://agentwranglers.se/playbook/files-and-media/uploads/confirm-uploads.md) in Files and media
- MED-51 [Let large downloads resume with range requests](https://agentwranglers.se/playbook/files-and-media/serving-files/range-downloads.md) in Files and media

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/files-and-media/uploads/resumable-uploads">Agent Wranglers files and media playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Upload straight to storage with a signed address](https://agentwranglers.se/playbook/files-and-media/uploads/presigned-uploads.md)
- Next: [Confirm every upload on the server](https://agentwranglers.se/playbook/files-and-media/uploads/confirm-uploads.md)
- [Uploads](https://agentwranglers.se/playbook/files-and-media/uploads.md)
