How Large Uploads Work 00:00:01 A train enters a tunnel Noor is on a train uploading a four-hundred-megabyte video. Her browser has confirmation for the first seventy-two pieces. Piece seventy-three leaves just as the train enters a tunnel. Should the browser start the entire video again? In this design each piece is four million bytes. The browser reads a slice of the file when it is needed. For piece seventy-three, the first byte is at offset two hundred eighty-eight million. The source video stays on Noor's device. A progress bar might count bytes handed to a local send buffer. A transport acknowledgement says something different again. Noor needs an application reply from storage confirming the accepted offset. That is the progress she can resume from. 00:00:45 The piece failed to arrive Give the upload a session identifier. Noor sends the next piece with the offset she expects on the server. This attaches the bytes to a position in one upload, even if a network connection is replaced. Suppose the connection fails before storage accepts the piece. The server still has precisely two hundred eighty-eight megabytes. Noor sees silence. A timer alone cannot tell her what the other machine stored. When the expected offset matches, the server can validate the bytes, store them, then advance its durable checkpoint. The next offset is two hundred ninety-two megabytes. The order matters if the server itself restarts. 00:01:27 Only the answer went missing Run the tunnel again with one difference. This time storage accepts piece seventy-three and advances to two hundred ninety-two. Only the success reply disappears. The silence on the train sounds exactly the same. This particular design recognizes a matching, already accepted piece. It can return the existing offset without appending a second copy. Other resumable protocols tell the client to query the offset after a mismatch. Follow the protocol on both ends. A query or a validated duplicate response establishes the same next position in either case. Noor can now send piece seventy-four. A checkpoint represents accepted bytes even when the client missed the reply that first reported it. 00:02:13 Resume after the browser closes The train's signal is still unreliable. Before starting, the browser saved the upload identifier and enough information to recognize the file. This small record can survive closing the tab. In-memory counters and a temporary file handle may not. When Noor reopens the page, she selects the source again. Compare its identity to the saved record. Size and modification time can help catch accidental changes. A content fingerprint provides stronger evidence about the selected bytes. Ask the server where the accepted prefix ends. Use bounded retries and a randomized delay when connectivity is poor. A persistent session and a server checkpoint save the first seventy-three pieces from another trip through the tunnel. 00:02:58 Parallel parts change the bookkeeping Now allow parallel numbered parts. Suppose parts one, two and four are stored but part three is missing. A total byte count cannot identify the hole. Keep a manifest of accepted part numbers and their integrity information. A multipart completion request identifies which parts belong to the final file and their order. A storage provider sets its own part-size rules. The earlier four-megabyte choice belongs to our example sequential protocol. Check the expected size and required integrity evidence before making the file visible. Make completion safe to repeat if its reply goes missing. Noor's video survives a tunnel because file identity, durable progress and final publication each have an owner.