We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
GErler01
9 years agoExplorer | Level 3
Path for .NET SDK thumbnails
The .NET SDK examples seen to be thin. I am looking to display thumbnails from image files on Dropbox. I have the BeginGetThumbnail method but am having difficulty implementing it. It is returni...
- 9 years ago
1. To set parameters like those, you should supply values like this:
var asyncResult = this.client.Files.BeginGetThumbnail (path, Dropbox.Api.Files.ThumbnailFormat.Jpeg.Instance, Dropbox.Api.Files.ThumbnailSize.W64h64.Instance);
2. That IsPhoto is unfortunately not what you're looking for. That just tells you the particular subtype of a MediaMetadata instance. If you want to check the type of a file, you should check its file extension. You can then compare the extension against the list of supported extensions for GetThumbnail.
GErler01
9 years agoExplorer | Level 3
No problem. Its easy enough to setup an asinc service, get a list and parse thru them. 2 more questions I ran into.
1. Is Thumbnail size fixed?? I have changed the size in the request but they are always the same;
"BeginGetThumbnail(item.PathLower, format.AsJpeg, size.AsW64h64)"
2. How do I check if a file is a photo?? I thought this had promise but nope
"Entries.Where(n=>n.AsFile.MediaInfo.AsMetadata.Value.IsPhoto))"
Thx
G
Greg-DB
Dropbox Community Moderator
9 years ago1. To set parameters like those, you should supply values like this:
var asyncResult = this.client.Files.BeginGetThumbnail (path, Dropbox.Api.Files.ThumbnailFormat.Jpeg.Instance, Dropbox.Api.Files.ThumbnailSize.W64h64.Instance);
2. That IsPhoto is unfortunately not what you're looking for. That just tells you the particular subtype of a MediaMetadata instance. If you want to check the type of a file, you should check its file extension. You can then compare the extension against the list of supported extensions for GetThumbnail.
- GErler019 years agoExplorer | Level 3Thanks for the information.
Go kind of a feel for how this API is put together
don't seem to be many using the .NET
G- Greg-DB9 years ago
Dropbox Community Moderator
The Dropbox API now offers the ability to get thumbnails in batches. In the .NET SDK, that's available as:
https://dropbox.github.io/dropbox-sdk-dotnet/html/M_Dropbox_Api_Files_Routes_FilesUserRoutes_GetThumbnailBatchAsync_1.htm
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!