-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getOffsetFromResponse isn't behaving quite right #46
Comments
kukhariev
added a commit
that referenced
this issue
Jul 16, 2019
I think it'll work 🛴 ngx-uploadx/src/uploadx/src/uploaderx.spec.ts Lines 27 to 43 in 484729d
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
in uploaderx.ts, getOffsetFromResponse doesn't seem to be behaving quite right for the following use cases.
Missing Range: this should be allowed, using the same Google Doc upload reference (https://developers.google.com/drive/api/v3/manage-uploads#resume-upload) that you are using. This should tell the service that no content has been received and to start at byte 0.
"Range: bytes=0-1" : This will get matched as "-1" and will send from byte 0. There's not really a standard on using the Range header on a response, so not sure of what the right answer is. Possible solution would be looking for two dashes when matching "-1", ie, "-1--1" for no content. /(--1|\d+)$/g
Also looking for just "-1", like "Range: bytes=-1" could work.
https://github.com/kukhariev/ngx-uploadx/blob/master/src/uploadx/src/uploaderx.ts
The text was updated successfully, but these errors were encountered: