# 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.