We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
rami2
10 years agoExplorer | Level 3
Create a link to a PDF file by '/media' (POST request) and embedding in the browser
I tried to embedding PDF file that I get from '/media' API in HTML file. Unfortunately, the response contains the header: "Content-Disposition" which defined as "attachment", so the file can't opening as a view in the browser and the user need to download the file only. It is possible to change the header?
1 Reply
- Greg-DB10 years ago
Dropbox Community Moderator
[Cross-linking for reference: https://stackoverflow.com/questions/41123648/html-embed-pdf-file-from-the-dropbox-with-pdf-viewer-online ]
No, unfortunately Dropbox doesn't offer a way to control that in this case.
This isn't really the intended use of these, but shared links (as opposed to these temporary links) may work better for your use case.
In any case, you're using API v1, which is deprecated:
https://blogs.dropbox.com/developers/2016/06/api-v1-deprecated/
You should migrate to API v2 when possible:
https://www.dropbox.com/developers/documentation/http/documentation
For example, using API v2 you can get a shared link using:
You can modify those links as shown here:
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, Facebook or Instagram.
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!