Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dart SDK not uploading correct length of chunks #719

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

stnguyen90
Copy link
Contributor

What does this PR do?

The chunk length is supposed to be equal to CHUNK_SIZE or whatever is left for the file, but the - 1 for the end made the chunk 1 less than the correct length (due to the way getRange works).

For example, see the chunk length when using fromBytes():

fromBytes

vs fromPath():

fromPath

Test Plan

Manually tested and was able to upload the file successfully:

Screen Shot 2023-09-21 at 5 11 18 PM

In addition, comparing the uploaded file with the original file showed they were the same:

image

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

Yes

The chunk length is supposed to be equal to CHUNK_SIZE or whatever is
left for the file, but the - 1 for the end made the chunk 1 less than
the correct length (due to the way getRange works).
@stnguyen90 stnguyen90 linked an issue Sep 22, 2023 that may be closed by this pull request
2 tasks
@lohanidamodar lohanidamodar merged commit 2069238 into master Sep 25, 2023
1 of 2 checks passed
@lohanidamodar lohanidamodar deleted the fix-6304-dart-sdk-create-file-bytes branch September 25, 2023 01:17
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.

🐛 Bug Report: Creating File with Dart SDK Fails
2 participants