You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Large File Upload - retry doesn't work for StreamUpload #452
It looks like the retry for the large file upload doesn't work for StreamUpload.
When the resume is invoked, in the first step the getStatus method is called in order to update expiry and nextRange properties - at this step everything is fine.
After properties are properly updated, the upload is called and then sliceFile() from the StreamUpload that is causing a problem - it should read the bytes that should be retried, but instead, it's just getting next portion of bytes which seems to be not correct since the bytes that should be retired are not read from the stream.
Steps to Reproduce
Call resume method when the StreamUpload is passed to the LargeFileUploadTask:
function test(): Promise<any> {
const fileObject = new StreamUpload(readStream, data.fileName, data.fileSize);
const uploadTask = new LargeFileUploadTask(client, fileObject, uploadSession);
try {
await uploadTask.upload();
} catch(error) {
await uploadTask.resume();
}
}
Expected behavior: The upload is properly resumed for the stream data.
Actual behavior: The retry doesn't work for the stream data.
Activity
nikithauc commentedon May 12, 2021
Michał Dybich (@mdybich) Thank you for reporting this issue! I will take a look at it.
nikithauc commentedon Jun 8, 2021
Michał Dybich (@mdybich) A fix for this has been released in https://www.npmjs.com/package/@microsoft/microsoft-graph-client/v/3.0.0-Preview.2.