We Want to Hear From You! What Do You Want to See on the Community? Tell us here!

Forum Discussion

Remers10's avatar
Remers10
New member | Level 2
3 years ago

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

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

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 years ago

    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.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 12 hours ago
411 Following

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!