Resumable upload protocol for video APIs
How resumable upload protocols work for large video files, and why they matter for reliability on flaky connections.
A resumable upload protocol lets a client ask the server how many bytes it has already received and continue from exactly there after an interruption. The common shape has three phases: initiate a session declaring the file's size and type, transfer bytes in declared ranges, then query authoritative progress — YouTube's Content-Range bytes */TOTAL check is the clearest documented example.
Chunking a large upload into pieces solves the size problem. It doesn't, by itself, solve the reliability problem: if the connection drops on chunk 40 of 60, does the client know it can pick up at chunk 41, or does it have to guess — or start over? A resumable upload protocol is specifically the piece that answers that question: a way to ask the server "how far did we get?" and continue from exactly there, which is the property that actually matters on a flaky mobile or enterprise network.
PostGate handles OAuth, publishing and delivery evidence for every network through one API. Start free or read the docs.
Is 'resumable' just a synonym for 'chunked'?
A protocol can split a file into chunks without being resumable — if the server has no way to report which chunks it already has, a client that loses its session has to start the whole sequence over regardless of how many chunks succeeded first. Resumability adds a query step: at any point, the client can ask the server for its current progress and get back an authoritative answer, instead of tracking progress locally and hoping its own record matches reality after a crash or a lost connection.
What is the three-phase shape behind most resumable protocols?
YouTube's resumable upload protocol is the clearest documented example of the pattern. Initiate a session: send the file's metadata and declare its size and MIME type up front; the server responds with a session URI dedicated to that one upload. Transfer in byte ranges: PUT the file's bytes to that session URI, one or more times, each request declaring exactly which byte range it covers via a Content-Range header. Query and resume: if a transfer is interrupted, send an empty-body PUT with Content-Range: bytes */TOTAL — the server replies with exactly which bytes it has already received, so the client resumes from that offset instead of guessing. The full mechanics, including the 308 Resume Incomplete response and the 256 KiB chunk-size alignment YouTube requires, are covered in YouTube's resumable upload protocol, step by step.
PUT {session-uri} HTTP/1.1
Content-Length: 0
Content-Range: bytes */52428800
# Server replies with what it already has, e.g.:
# 308 Resume Incomplete
# Range: bytes=0-20971519Does the same shape show up beyond YouTube's implementation?
The vocabulary differs, but the underlying pattern — declare size and type up front, transfer in verifiable pieces, ask the server for authoritative progress — recurs across unrelated protocols. The open tus resumable upload protocol formalizes it as a vendor-neutral HTTP spec with its own Upload-Offset header doing the same job as YouTube's Content-Range query. Amazon S3's multipart upload achieves the same resilience with numbered, independently-retryable parts and their ETags instead of a continuous byte-range session. LinkedIn's own video upload API follows a comparable initialize-then-upload-parts shape as well — see LinkedIn Video Upload API for how that one is structured. Different vocabulary, same underlying goal: never make a client re-send a byte the server already has.
Why does this matter specifically for video?
Video files are large, and the situations that produce them — a phone on a spotty cellular connection, a marketing team member on a hotel network — are exactly the situations where a connection is most likely to drop mid-transfer. Without resumability, a drop 95% of the way through a 40-minute upload means starting the entire 40 minutes over. With it, the client loses only the time since its last acknowledged byte. That difference is why platforms with any meaningful video upload volume require the resumable protocol rather than accepting a plain single-shot POST for anything beyond a small test file.
How does PostGate handle this so you never implement it directly?
PostGate's media pipeline carries out the resumable relationship with the destination platform on your behalf. Pre-upload a file — directly or via multipart upload for large assets — to POST /api/media, and PostGate manages sessions, byte-range or part-based transfer, and progress tracking against the actual platform internally before your post request ever runs. Your integration deals with a single media ID; PostGate deals with session URIs, part uploads, and Content-Range headers wherever the destination platform requires them.
Frequently asked questions
What is the difference between a chunked upload and a resumable upload?
A protocol can split a file into chunks without being resumable. If the server has no way to report which chunks it already has, a client that loses its session must start the whole sequence over regardless of how many chunks succeeded. Resumability adds a query step: the client can ask the server for authoritative progress at any point and continue from exactly there.
How do I resume an interrupted YouTube video upload?
Send an empty-body PUT to the upload session URI with Content-Range: bytes */TOTAL. The server replies — typically 308 Resume Incomplete with a Range header — stating exactly which bytes it has already received, so the client resumes from that offset instead of guessing. YouTube also requires chunk sizes aligned to 256 KiB.
Do other platforms use the same resumable upload pattern as YouTube?
Yes, with different vocabulary. The open tus protocol formalizes it as a vendor-neutral HTTP spec whose Upload-Offset header does the same job as YouTube's Content-Range query. Amazon S3's multipart upload uses numbered, independently retryable parts with ETags instead of a continuous byte-range session, and LinkedIn's video upload API follows a comparable initialize-then-upload-parts shape.
Do I need to implement resumable uploads myself when using PostGate?
No. Pre-upload the file to POST /api/media — directly, or via multipart upload for large assets — and PostGate carries out the resumable relationship with the destination platform internally: sessions, byte-range or part-based transfer, and progress tracking. Your integration deals with a single media ID rather than session URIs and Content-Range headers.
