cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right 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: 

Incorrect content type returned when downloading images from dl.dropboxusercontent.com

Incorrect content type returned when downloading images from dl.dropboxusercontent.com

Remers10
New member | Level 2

A content-type of "application/json" is returned whenever requesting a public image hosted by dropbox. I've tested with both a png and jpg

 

 

$ curl -I https://dl.dropboxusercontent.com/s/REDACTED/name.png?dl=1
HTTP/2 200
accept-ranges: bytes
cache-control: max-age=60
content-disposition: attachment; filename=name.png
content-security-policy: report-uri https://www.dropbox.com/csp_log?policy_name=blockserver-usercontent ; sandbox allow-forms allow-scripts allow-top-navigation allow-popups
content-security-policy: form-action 'none' ; report-uri https://www.dropbox.com/csp_log?policy_name=blockserver-noscript ; script-src 'none'
etag: REDACTED
pragma: public
set-cookie:  REDACTED; Domain=dropboxusercontent.com; HttpOnly; Path=/; SameSite=None; Secure
x-content-type-options: nosniff
x-server-response-time: 123
content-type: application/json
accept-encoding: identity,gzip
date: Mon, 03 Oct 2022 21:02:59 GMT
server: envoy
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-robots-tag: noindex, nofollow, noimageindex
content-length: REDACTED
vary: Accept-Encoding
x-dropbox-response-origin: far_remote
x-dropbox-request-id: REDACTED

 

 

1 Reply 1

Greg-DB
Dropbox Staff

Thanks for the report. I've asked the team to fix that up.

 

By the way, note that Dropbox does not officially support accessing 'dl.dropboxusercontent.com' directly like that. You should use 'www.dropbox.com' with the 'dl' or 'raw' parameter and follow redirects, as shown in this help center article.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?