Skip to content

fix: resume large file uploads with the stored large-file SHA1 - #262

Open
MatheoPaiva wants to merge 1 commit into
Backblaze:masterfrom
MatheoPaiva:fix/sample-resume-large-file-sha
Open

MatheoPaiva wants to merge 1 commit into
Backblaze:masterfrom
MatheoPaiva:fix/sample-resume-large-file-sha

Conversation

@MatheoPaiva

Copy link
Copy Markdown

Fixes #249

Use the unfinished large file's large_file_sha1 value when building the sample upload request. content_sha1 is none for unfinished large files, while the resume validation compares against large_file_sha1, so the sample rejected its own resume operation.

Validation: cross-checked the sample against B2LargeFileUploader.throwIfLargeFileVersionDoesntSeemToMatchRequest and the B2ContentWriter SHA1 handling. Java compilation and tests were not run because a Java compiler is unavailable in this environment.

AI assistance: prepared with OpenAI Codex.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sample finish_uploading_large_file uses the wrong sha1 and fails its resume check

1 participant