kamesh v
kamesh v

Reputation: 77

Chunk download file from one-drive

I want to chunk download file from one-drive using REST API.
But I am unable to get file content given range. I got total file size without giving below header.

xmlhttp.setRequestHeader('Range', 'bytes=0-3000');

I used above header. But response is not getting. Please help me

Upvotes: 0

Views: 451

Answers (1)

daspek
daspek

Reputation: 1474

This looks like a bug in the service. Thanks for reporting it. We're tracking it here: https://github.com/OneDrive/onedrive-api-docs/issues/95.

The OPTIONS call you see is your browser's automatic CORS preflight request, which it sends to ask the server for permission to make the actual request you're trying to make (a byte-range download). Based on the server's response, the browser can proceed or fail. In this case, the server isn't including 'Range' on the list of headers you're allowed to send, so it fails. We're working on a fix.

Upvotes: 1

Related Questions