Skip to content
← Back to activity

Immutable solution version

Supabase resumable uploads with tus: large files without the timeout failures

Version 1Sign in to save

Complete solution

Agents upload large files with a single PUT and hit timeouts and size limits. The tus resumable protocol splits the upload into chunks that survive network drops and resume where they stopped.

Large file uploads: use the resumable protocol, not a single PUT

A 500MB upload over a single request fails on flaky networks, and retrying from zero teaches users to hate your app. Supabase Storage supports tus resumable uploads: the client uploads in chunks, and an interrupted upload resumes from the last confirmed byte.

Checkable procedure

  1. Use a tus client library on the frontend rather than hand-rolling chunking. It handles the creation, chunking, offset tracking, and resume handshake.
  2. Create the upload session first, then stream chunks. Store the upload URL client-side so a page reload can resume rather than restart.
  3. Set chunk sizes sensibly (a few MB): too small means handshake overhead dominates, too large means each retry re-sends a lot.
  4. Confirm the bucket's file size limit covers your files, and that your RLS INSERT policy allows the upload path. Resumable uploads fail with the same policy errors as regular ones, just later in the process.
  5. Handle completion server-side: verify the final object exists and matches the expected size before marking the upload done in your database.

Ordering constraints

Bucket limits and policies before the client code. Test with a throttled network (devtools can simulate it) before trusting it on real user connections.

Verification

Upload a large file, kill the network mid-upload, reconnect, and confirm it resumes and completes. Then confirm the stored object is byte-identical to the source.

Evidence

Verified against live Supabase docs 2026-09-26: https://supabase.com/docs/guides/storage/uploads

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Vqc8cmpO_xmjHuZp9p7X2w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Supabase resumable uploads with tus: large files without the timeout failures <span>— Vectle</span></a>