cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

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: 

Re: Downloading part of a file via /get_temporary_link with Range header returns incorrect content-t

Downloading part of a file via /get_temporary_link with Range header returns incorrect content-type

De L.1
Collaborator | Level 9
Go to solution

When downloading a specific part of a file using the link received via a /get_temporary_link call and the HTTP header Range: bytes=..., the content-type application/grpc is sent instead of the actual content-type of the file.

 

Request Headers:

 

GET https://uc383828c22b...3d5ecbc28.dl.dropboxusercontent.com/cd/0/get/B61A....17HuE3Lr3UI4EEpPY/file
range:bytes=0-

 


Expected Response Headers:

 

HTTP/1.1 206 Partial Content
---
accept-ranges:bytes
Content-Length:26397831
Content-Range:bytes 0-26397830/26397831
content-type:video/mp4

 

 

Actual Response Headers:

 

HTTP/1.1 206 Partial Content
---
accept-ranges:bytes
Content-Length:26397831
Content-Range:bytes 0-26397830/26397831
content-type:application/grpc

 

 

So in this example (actually downloading the full file, but with the Range header), the video file is downloaded with a content-type of application/grpc rather than video/mp4.

 

This causes problems when (for example) you want to display a video file in an HTML 5 player using the link received from the /get_temporary_link call.  The HTML 5 player buffers the video file and loads the data in chunks. However, due to the incorrect content type, the browser will not accept the data as video content and will not be able to play it.

I've just noticed this problem, and I didn't have any problems with it before. So I think this problem has been introduced recently?

29 Replies 29

rylincoln
New member | Level 2
Go to solution

But i think Dropbox fixed the issue, cuz now i'm getting back correct content-type and our application plays videos as expected.

Greg-DB
Dropbox Staff
Go to solution

@rylincoln Thanks for the note. I wasn't able to reproduce that exact behavior, but depending on how your device/browser was trying to play the video, it may have been automatically sending 'Range'. In any case, I'm glad to hear you're seeing it working again. We have begun to roll out a fix. Please note it will take some to fully deploy it.

TaiT
New member | Level 2
Go to solution
It already works for me. Thank you very much Dropbox team

For future API updates, don't forget to make Rclone compatible. We are a great community.

I know that third-party applications are not a priority. But I wouldn't like to leave this team after 4 years with you.

A hug

WoisWoi
New member | Level 2
Go to solution

Same for me (possibly with degraded performance) and I totally agree with you 🙂

Pyker
New member | Level 2
Go to solution

It works for me sometimes, I presume that it's still rolling out.

star_fox
New member | Level 2
Go to solution

i still get errors

 

2023/04/25 20:49:03 ERROR : MOVIE.mkv: ReadFileHandle.Read error: low level retry 5/10: failed to authenticate decrypted block - bad password?
2023/04/25 20:49:05 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:07 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:08 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:08 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:10 Unsolicited response received on idle HTTP channel starting with "m\x12 RCLONE\x00\x00\xe8*Z\x9eT\x1cG\xd4\xf8[\x96e\x9e\xdd\xef\x145\x97\xb9\xa0H\xf2\xe6J"; err=<nil>
2023/04/25 20:49:10 ERROR : MOVIE.mkv: ReadFileHandle.Read error: low level retry 1/10: not an encrypted file - bad magic string
2023/04/25 20:49:12 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:13 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:15 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:16 ERROR : IO error: not an encrypted file - bad magic string
2023/04/25 20:49:17 ERROR : IO error: not an encrypted file - bad magic string

Greg-DB
Dropbox Staff
Go to solution

The fix is rolling out and is not out fully everywhere yet.

star_fox
New member | Level 2
Go to solution

now i get no errors anymore

 

thanks!

Greg-DB
Dropbox Staff
Go to solution

This should be fixed now. Please let us know if you're still seeing any issues.

Pyker
New member | Level 2
Go to solution

Thank you! It's working great now.

Need more support?