Skip to content

Conversation

@pedro-mpontes
Copy link

This change fixes an issue where the file upload would not read and upload the file chunks correctly. The original code incorrectly assumes that Stream.Read() would always read a full chunk of data from the file stream, when in reality it may return read fewer bytes. To solve this, the new UploadChunkAsync helper method ensures the entire chunk is read from the stream before proceeding with the upload.

This change fixes an issue where the file upload would not read and upload the file chunks successfully.
The original code incorrectly assumed that Stream.Read() would always read a full chunk of data from the file stream, when in reality it may return read fewer bytes.
To solve this, the new UploadChunkAsync helper method ensures the entire chunk is read from the stream before proceeding with the upload.
@coveralls
Copy link

Coverage Status

coverage: 52.529% (-1.0%) from 53.518%
when pulling 933c12e on pedro-mpontes:fix-file-upload
into 09c9177 on Bynder:master.

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.

2 participants