Resume decision table
Resume is a transfer mechanism, not a storage extension. Each new request must still address the same owned object and pass the service's current access rules. The ordinary resume guide explains matching offsets and responses; this guide adds the separate case where that original resource has reached its permanent media deadline. A request already in progress may have implementation-specific behavior, so this procedure does not promise that a stream is interrupted at precisely the expiry millisecond or that an accepted transfer can always finish. Design for the next request to fail cleanly, without turning a readable prefix into a falsely completed deliverable.
What to do next
- 01
Preserve a precise partial-download record
Associate the temporary file with the original task, object identity, expected media type and validated byte count. Record the known expiry evidence separately from the last successful transfer time. A filename such as final.mp4 is not enough to identify the resource. If a browser downloaded an HTML error earlier, the saved length is not a valid resume offset and must not be treated as media progress.
- 02
Branch on the actual continuation response
Inspect the status before writing any returned body. Append only a compatible partial response for the same representation and correct starting offset. A full response requires the separately reviewed restart path; an invalid-range response requires offset investigation. For an expired-file response, mark the resource expired and stop automatic retries. Do not append JSON error text, a sign-in page or a new object's bytes to the old partial.
- 03
Explain the lost continuation honestly
Tell the user that the locally saved prefix is incomplete and the original cloud continuation is unavailable. Check whether they already hold a separate complete download. Preserve minimal task and transfer evidence for support without promising that support can restore deleted bytes. A new generation would be a new creative and spending decision, so require its own current inputs, quote and authorization rather than hiding it inside Download again.
A concrete example
Illustrative case: an integration saves a validated first 8 MiB of a known result, loses its connection and resumes after the file's retention deadline. The continuation returns the expired-file status rather than the next media range. The application leaves the temporary prefix clearly incomplete, records the terminal reason and does not add the error body to it. It neither reports a complete 8 MiB video nor spends credits to replace the missing resource. This example is a proposed client-state test, not an observation of a real customer's interrupted download.
Resume decision table
| Continuation response | Local action | Forbidden shortcut |
|---|---|---|
| Compatible partial media | Append after range validation | Assume every successful response starts at the requested byte |
| Full media response | Use an explicitly verified restart path | Append a complete file to a prefix |
| Expired resource | Keep partial incomplete and stop | Create a new paid task in a download retry |
Before you call it ready
- The saved prefix belongs to one immutable output.
- No error body is appended to media bytes.
- Expired and retryable transport failures have different states.
- An incomplete transfer never receives the approved-deliverable label.
When to stop or choose another method
Stop if you cannot verify that the partial bytes belong to the original object. A local prefix is not a usable archive, and a cached player frame does not fill the missing tail. Test response handling with synthetic byte fixtures first; do not wait for a client's only output to expire as a production experiment. The current product's retention rule does not authorize extraction of somebody else's result or bypassing ownership checks.
