cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more 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

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?