cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating temporary links for a slideshow (one device)

Helpful | Level 6

Hi all,

 

I own a website where people can create a real-time slideshow from various social providers such as Instagram, Twitter, Facebook, etc.

 

 

I've received a couple of requests where people want to be able to display photos from a Dropbox folder, so I've been researching the Dropbox API to see what options I have.

 

I understand that Dropbox should not be used as a CDN to serve files to hundrends or millions of people, but in my case a slideshow is usually running on a single device, so I feel like the temporary link might be a good option.

 

Now straight to my question. I call list_folder to retrieve all the files in the app folder. For each file I'll need to call get_temporary_link to get a direct link to the file. Now if the directory has 100 files, then it means that I'll have to make 100 calls to the Dropbox API in order to get temporary link for all the files. I'm very concerned with the API rate limit as this might easily surpass it.

 

 

This probably means that I need to re-think my strategy.

 

Here are some ideas that I have:

1. Call get_temporary_link on demand. The slideshow javascript will call an endpoint on my website where it requests for a direct link to the picture. My endpoint then calls the Dropbox API get_temporary_link and returns it to the slideshow.

2. Somehow serve the file from Dropbox through my website. Not quite sure how I would tackle this.

3. ?

 

Any help on this will be highly apprecicated.

 

Thanks!

 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Creating temporary links for a slideshow (one device)

Dropboxer
Dropboxer

The Dropbox API rate limiting system is actually relatively generous. We don't have any specific numbers documented, but making 100 calls shouldn't be an issue. 

 

Alternatively, you can download the files directly from the Dropbox API, e.g., using /2/files/download or /2/files/get_thumbnail, and then cache and serve them from your app. You would still need one call per file though.

View solution in original post

2 Replies 2
Highlighted

Re: Creating temporary links for a slideshow (one device)

Dropboxer
Dropboxer

The Dropbox API rate limiting system is actually relatively generous. We don't have any specific numbers documented, but making 100 calls shouldn't be an issue. 

 

Alternatively, you can download the files directly from the Dropbox API, e.g., using /2/files/download or /2/files/get_thumbnail, and then cache and serve them from your app. You would still need one call per file though.

View solution in original post

Highlighted

Re: Creating temporary links for a slideshow (one device)

Helpful | Level 6

Thank you Greg. Much appreciated.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?