Skip to content

Content Range header is not calculated correctly for resumable uploader multiple requests #102

Open
@cip123

Description

@cip123

This is the output of the console.log

 LOG  bytes 0-262143/*
 LOG  upload chunk 1 {"isComplete": false, "transferredByteCount": 262144}
 LOG  bytes 262144-524287/*
 LOG  upload chunk 2 {"isComplete": false, "transferredByteCount": 524288}
 LOG  bytes 786432-1048575/*
 LOG  Big error in importing: HttpError: Invalid request.  According to the Content-Range header, the upload offset is 786432 byte(s), which exceeds already uploaded size of 524288 byte(s).!

I think the problem lies on this line:

this.__transferredByteCount += transferredByteCount

in ResumableUploader, where the transferredByteAccount is aggregating.

I corrected it to

this.__transferredByteCount = transferredByteCount

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions