One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
crhc-tony
4 years agoNew member | Level 2
Using Dropbox Images in an HTML Photo Gallery
I am storing a large number of images in Dropbox folders and need to GET all images from a single DBX folder into an HTML Gallery on my website. My site is hosted with a 3rd party, clubexpress.com, and my users prefer managing images from Dropbox since it's more intuitive and efficient. Clubexpress doesn't provide backend access. Also, JavaScript capabilities are limited and unsupported.
I'm not a programmer by trade but I need to find a way to pull the dropbox folder images into an HTML image gallery given the limitations described above. I'm thinking I might be able to use the DBX API to get image links into an array and then use onsite JavaScript to loop through and populate the gallery with the appropriate links.
I would greatly appreciate any help and insights on this. It would really help if you know of a tutorial that might walk through the deatils.
Does anyone know of an option I might use to get this done?
- Greg-DB
Dropbox Staff
To create a shared link for any particular file via the Dropbox API, you can use the /2/sharing/create_shared_link_with_settings endpoint:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings
By the way, that's a link to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.By default, shared links point to HTML preview pages, not the file content itself. You can modify these links for other behaviors though, such as direct file access. You can find information on doing so here:
https://help.dropbox.com/files-folders/share/force-download- crhc-tonyNew member | Level 2
Thanks Greg.
I've just started working with the API and I'm wondering if it's possible to get all images from a shared folder without using oauth2.
My folders are setup for dedicated use and only users who have signed into my site can access the links to these folders.
Is there a url parameter that would return an array of filenames?
- Greg-DB
Dropbox Staff
No, there's nothing quite like that. Beyond accessing the contents of a shared link directly, you'll need to use the API as documented, e.g., by passing up an OAuth 2 access token.
About Discuss Dropbox Developer & API
Make connections with other developers807 PostsLatest Activity: 2 days ago
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!