Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Resume stream upload #460

Merged
nikithauc merged 6 commits intodevmicrosoftgraph/msgraph-sdk-javascript:devfrom
bugfix/stream-resumemicrosoftgraph/msgraph-sdk-javascript:bugfix/stream-resumeCopy head branch name to clipboard
Jun 4, 2021
Merged

Resume stream upload #460
nikithauc merged 6 commits intodevmicrosoftgraph/msgraph-sdk-javascript:devfrom
bugfix/stream-resumemicrosoftgraph/msgraph-sdk-javascript:bugfix/stream-resumeCopy head branch name to clipboard

Conversation

@nikithauc
Copy link
Contributor

fixes #452

Problem -
*StreamUpload.sliceFile function reads the first n bytes from the Stream.

  • If an upload fails after the 0 - n is read from the stream, then on upload resume the sliceFile function reads from n+1 bytes and 0-n is never uploaded.

Solution -

  • Added ChunkRecord interface which keeps track of the previous slice and range.
  • Compare the new upload range with the previous range and read the bytes accordingly.

test/node/tasks/StreamUpload.ts Show resolved Hide resolved
src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts Outdated Show resolved Hide resolved
src/tasks/FileUploadTask/FileObjectClasses/StreamUpload.ts Outdated Show resolved Hide resolved
test/node/tasks/StreamUpload.ts Show resolved Hide resolved
@nikithauc nikithauc merged commit 710de2d into dev Jun 4, 2021
@nikithauc nikithauc mentioned this pull request Jun 8, 2021
@nikithauc nikithauc deleted the bugfix/stream-resume branch September 28, 2022 23:48
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.

Large File Upload - retry doesn't work for StreamUpload

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.