cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

How to display images (get their links) without making two API calls? (Javascript API)

How to display images (get their links) without making two API calls? (Javascript API)

Mesqueeb
Helpful | Level 6

So I currently have a set up to display images on a webpage:

 

dbx.filesListFolder({path: ""})
	.then(function(response) {
		response.entries.forEach( (file) => {
			dbx.filesGetThumbnail({path: file.path_display, size: 'w1024h768'})
			// And here I wrote the code that creates <img> to display them on my page.

However, this makes my client make two API calls, which is a heavy payload. Is there a way to combine `dbx.filesListFolder` and `dbx.filesGetThumbnail` into 1 API call?

 

Cheers!

1 Reply 1

Re: How to display images (get their links) without making two API calls? (Javascript API)

Greg-DB
Dropboxer

No, unfortunately there isn't a way to get thumbnails along with the listing at the same time. I'll pass it along as a feature request.

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?