Resume only the same confirmed object
Keep the job ID, expected content type and saved-byte count with the partial transfer. A different task or a failed error response must not be appended merely because it has a similar filename. Authentication and ownership checks still apply to range requests, and an interrupted download is not a reason to create new media.
What to do next
- 01
Measure the partial file
Determine the number of valid saved bytes and retain the original job identity. Avoid assuming a file is complete based on its extension or a previous progress indicator.
- 02
Request the remaining range
Send the appropriate Range header through your authenticated backend. Check status and Content-Range before deciding whether to append, restart or investigate an invalid offset.
- 03
Validate the completed asset
Compare final size where known and confirm the expected media is readable. Finalize the file only after a complete successful transfer, preserving the original output rather than requesting another generation.
A concrete example
Illustrative request: a known MP4 partial contains its first 1,024 bytes. The downloader requests bytes=1024- and appends only a compatible 206 response. A JSON 401 body is handled as an error, not video continuation.
Before you call it ready
- The partial belongs to the same job.
- Range response headers are validated.
- A full response is not appended as a partial continuation.
When to stop or choose another method
If the local partial's integrity is uncertain, redownload the existing asset cleanly. Do not concatenate ambiguous bytes or regenerate a paid result to solve a transfer issue.
