We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
Vincent P.9
8 years agoExplorer | Level 4
How can I get public URLs for all files within a folder?
Hi,
I use Dropbox to manage a photo gallery. Co-workers can change photos within the folder and I can show them on our website.
Right now, I proxy the request to get the file but that's a lot of calls and files are heavy.
Instead, I would like to embed to use the Dropbox URL directly to show photos, like:
<img src="https://www.dropbox.com/s/fn64tdfaregvefez/001.jpg" />
Is there a way to get public URLs for all files within a folder?
Thanks
5 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
If you want to get the shared links like the one in your sample, you can use /2/sharing/create_shared_link_with_settings to create one, if one doesn't already exist:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings
If you're using an official SDK, there will be a corresponding method for that.
Note that you'll need to call for each file in the folder that you want.
A link already exists, you can use /2/sharing/list_shared_links to retrieve it:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links
Also, note that by default, these shared links point to preview pages, not the files themselves, but you can modify them for direct access as shown here:
https://www.dropbox.com/help/desktop-web/force-download - Vincent P.98 years agoExplorer | Level 4
Hi,
Thank you for your answer. I was trying it and it's extremely slow to create new links with create_shared_link_with_settings, is there a way to batch that?
Thanks!
- Greg-DB8 years ago
Dropbox Community Moderator
No, unfortunately there isn't a way to create shared links in bulk, but I'll pass this along as a feature request. - hypebaestyle7 years agoNew member | Level 2
And what about now? Did you already do it? We need to upload many photos from dropbox to our website, and if we will do it one by one - it will be very, very long process! Is there any solution to automate share links creation from folder with image files?
- Greg-DB7 years ago
Dropbox Community Moderator
hypebaestyle No, unfortunately the Dropbox API still doesn't offer a batch shared link creation endpoint.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,037 PostsLatest Activity: 8 hours ago
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!