Description
Bug Report
Description
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.
Usage Information
SDK Version - 3.0.0-Preview.1