cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

API v2 send HTTP "Range" request not working

New member | Level 1
New member | Level 1

Hi dropbox,

------------

app permission type: App folder

API version: dropbox API v2

description: HTTP request with "Range" header field not working.

------------

A HTTP request with "Range" header should works like:

Request:

GET /test_320x180.mp4
Range: bytes=1000-

Response:

206 Partial Content
Content-Type: video/mp4
Content-Length: 64656927
Accept-Ranges: bytes
Content-Range: bytes 1000-64656926/*

But got these:

> POST /2/files/download HTTP/1.1

> Host: content.dropboxapi.com

> User-Agent: curl/7.43.0

> Accept: */*

> Authorization: Bearer h4CFOpR9f5UAAAAAAAAnRbDUUE……

> Dropbox-API-Arg: {"path": "/test.png"}

> Range: bytes=2000-

>

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

< HTTP/1.1 200 OK

< Server: nginx

< Date: Sun, 08 Nov 2015 15:39:07 GMT

< Content-Type: application/octet-stream

< Content-Length: 14659

< Connection: keep-alive

< pragma: no-cache

< cache-control: no-cache

< original-content-length: 14659

< dropbox-api-result: {"name": "test.png", "path_lower": "/test.png", "id": "id:wPJq19T.....", "client_modified": "2015-11-08T09:18:28Z", "server_modified": "2015-11-08T10:18:28Z", "rev": "1f3f632b5f", "size": 14659}

< X-Server-Response-Time: 186

< X-Dropbox-Request-Id: 4079fdd986580631468b829d8d20bebe

< X-Robots-Tag: noindex, nofollow, noimageindex

<

-------------------

Can not finish my job without "Range"'s help.

Help please, thank you so much!

 

 

 

 

 

10 Replies 10
Highlighted

Re: API v2 send HTTP "Range" request not working

Dropboxer
Dropboxer

API v2 doesn't currently support Range Retrieval Requests, but we are planning on adding it in the future.

Highlighted

Re: API v2 send HTTP "Range" request not working

New member | Level 1
New member | Level 1

Thanks Gregory!

 

Highlighted

Re: API v2 send HTTP "Range" request not working

New member | Level 2
New member | Level 2

Dear Gregory!

 

Please don't hesitate to implement this feature It would be extremely helpful...

The absence of it is painful :(

 

Thanks in advance

Highlighted

Re: API v2 send HTTP "Range" request not working

Dropboxer
Dropboxer

Thanks for the feedback, Norbert! I'm sending it along.

Highlighted

Re: API v2 send HTTP "Range" request not working

New member | Level 2
New member | Level 2

Dear Gregory,

 

I would like to ask, when can we expect the range support for downloading? (partial download)

 

Now if i have for example 4 video file, and all with 500MB length, and if i want to peek into these video files to get their codec, or other metadata, i am forced to download 2GB data instead of ~2KB!!! That is insane... I can't believe it.

Highlighted

Re: API v2 send HTTP "Range" request not working

Dropboxer
Dropboxer

This is still planned, but I don't have a timeline to share right now unfortunately. 

As a workaround, you can use /files (GET) on API v1 with Range Retrieval Requests, with the same OAuth 2 auth.

Highlighted

Re: API v2 send HTTP "Range" request not working

New member | Level 2
New member | Level 2

thanks Gregory, i will check it.

Highlighted

Re: API v2 send HTTP "Range" request not working

New member | Level 2
New member | Level 2

Dear Gregory!

I tested API v1, and i can download partial content which is good. Thanks.

But ... as is see API v1 is not support file access with ID. only with file path.

This is good while i have no special characters in name.

With special characters (for example: öüóőúéáűí) i got the path in encoded form. \u000

If i try to read file content for file with special \u000 encode characters in its name, i got error:

 "backslash not supported." the url encoding not helps. The question is:

How can i read file content with API v1 for files with special characters in the name?

Highlighted

Re: API v2 send HTTP "Range" request not working

Dropboxer
Dropboxer

You need to URI encode the path in the URL. For example, to download a portion of a file at "/tést.txt" using curl:

curl "https://content.dropboxapi.com/1/files/auto/t%C3%A9st.txt" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Range:bytes=0-3"
Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?