cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you interested in hearing how one of our Community members uses Dropbox for sailing trips? Read all about it 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: 

Thumbnails

Thumbnails

Daemonzoid
Explorer | Level 3
Go to solution

is there a way to GET tumbnails in batch now? getting the thumbnails one by one is really to slow to be usefull.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution
No, the Dropbox API doesn't currently offer a batch thumbnail endpoint, but I'll be sure to pass this along as a feature request.

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution
No, the Dropbox API doesn't currently offer a batch thumbnail endpoint, but I'll be sure to pass this along as a feature request.

Greg-DB
Dropbox Staff
Go to solution
The Dropbox API now offers the ability to get thumbnails in batches:

https://www.dropbox.com/developers/documentation/http/documentation#files-get_thumbnail_batch

If you're using an official SDK, there will also be a corresponding method for this endpoint.

Jeroen B.1
Explorer | Level 4
Go to solution

Does anyone have an example of working code, preferably in Python?

 

The method is called “files_get_thumbnail_batch”, but I am at a loss how to construct the argument. The docs call it “entries” and explain that this is “a list of files”, but what does that mean? What object type is meant, and how do I construct it?

 

Thanks!

Greg-DB
Dropbox Staff
Go to solution

@Jeroen B.1 Apologies, the Python documentation doesn't properly include the type for parameters that take lists like that.

 

The files_get_thumbnail_batch entries parameter should be a list of ThumbnailArg. That would look like:

 

entries = [
    dropbox.files.ThumbnailArg(path="/test.jpg", format=dropbox.files.ThumbnailFormat.png, size=dropbox.files.ThumbnailSize.w128h128),
    dropbox.files.ThumbnailArg(path="/test.png", format=dropbox.files.ThumbnailFormat.jpeg)
]

print(dbx.files_get_thumbnail_batch(entries=entries))

 

 

Jeroen B.1
Explorer | Level 4
Go to solution

Thanks, that should do it!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Jeroen B.1 Explorer | Level 4
  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?