cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Find out how Tiffany, a Customer Experience superstar uses Dropbox to keep her family in the loop when it comes to her new baby here!

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Dropbox Images in an HTML Photo Gallery

Using Dropbox Images in an HTML Photo Gallery

crhc-tony
New member | Level 2

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?

3 Replies 3

Re: Using Dropbox Images in an HTML Photo Gallery

Greg-DB
Dropboxer

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_...

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

Re: Using Dropbox Images in an HTML Photo Gallery

crhc-tony
New 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?

Re: Using Dropbox Images in an HTML Photo Gallery

Greg-DB
Dropboxer

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.

Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    crhc-tony New member | Level 2
What do Dropbox user levels mean?
Need more support?