Will resuming an upload preserve the original file byte for byte?
The original implementation failed the “Three-byte prefix saved” check. Expected bef57ec7f53a6d40 and observed 83857f640dc7bc18. The corrected implementation met both expectations on the same inputs.
What the control case missed
An uninterrupted transfer starts with an empty prefix and produces the right checksum. A resumed transfer combines the prefix and the whole file, duplicating the first bytes while still reporting success.
| Check | Expected | Original | Corrected |
|---|---|---|---|
| No saved prefix | bef57ec7f53a6d40 | bef57ec7f53a6d40 | bef57ec7f53a6d40 |
| Three-byte prefix saved | bef57ec7f53a6d40 | 83857f640dc7bc18 | bef57ec7f53a6d40 |
What to check before merging
Resume from the confirmed byte offset and verify the completed file's digest. The fixture uses ASCII to make the offset visible. In a full upload exercise binary buffers, multiple chunks and rejected offsets.
Reproduce the recorded result
Download the Node.js fixture and run node run.mjs file-upload-resume with Node.js 24. Compare the printed JSON with the recorded results. This is a locally executed model of the regression, using synthetic inputs. It covers the rule shown here. Hosted runs, browser behaviour and customer PRs require their own evidence.