Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Mostafa Ezzat
3 years agoExplorer | Level 4
Displaying file from Dropbox into a WebApplication using Dropbox API
Hello,
I want to find the best way to view a file like a video or image from Dropbox into a Website using HTTP or Javascript SDK
for example I'm trying at least to download a file using the shared link and CURL
I also have a question should I use double quotes or single quotes with CURL in the Doc of the website there is a Double quotes but I saw some API calls with single quotes
Basically, It's sync a folder's files which on Dropbox to the Website.
curl -X POST https://content.dropboxapi.com/2/sharing/get_shared_link_file \
--header "Authorization: Bearer <REDACTED> " \
--header "Dropbox-API-Arg: { \"path\":\"/Hi/drop.jpg\",\"url\":\"https://www.dropbox.com/s/tmziscnuzavon9a/drop.jpg?dl=0\"}"
It prints this error: {"error_summary": "shared_link_not_found/", "error": {".tag": "shared_link_not_found"}}
It prints this error: {"error_summary": "shared_link_not_found/", "error": {".tag": "shared_link_not_found"}}
Unfortunately, the Dropbox Chooser does not have an option for retrieving "direct" links that do not expire, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. As a workaround, you can use "preview" links, which don't expire, and modify them for direct access as documented here.
Also, regarding the issue with the files being disabled, looking at your code, it seems the issue here is that you're setting sizeLimit: 1024, which is limiting the user to selecting only relatively small files. Please try removing that option and you should see larger files selectable.
11 Replies
Replies have been turned off for this discussion
- Greg-DB3 years ago
Dropbox Community Moderator
No, the Dropbox Chooser does not offer an option for getting the name of the parent directory of the selected file. You can find all of the available options in the Chooser documentation.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!