Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Petar N.
10 years agoNew member | Level 1
Video thumbnails
Hi,
your documentation states the following for the get_thumbnail API:
"Get a thumbnail for an image. This method currently supports files with the following file extensions: jpg, jpeg, png, tif...
sigrem
9 years agoNew member | Level 1
Hi,
I use the following code to get thumbnail for images and videos (using Swifty Dropbox). It works for images and for many videos but crashes on some other videos. Shouldn't unsuccessful thumb generation be captured in the error section?
func fetchDropboxThumbnail(client: DropboxClient, file: Files.Metadata, toPath: String) {
let destination : (NSURL, NSHTTPURLResponse) -> NSURL = { temporaryURL, response in
let thumbUrl = NSURL(fileURLWithPath: toPath)
return thumbUrl
}
client.files.getThumbnail(path: file.pathLower, destination: destination).response { response, error in
if let response = response {
print("Assuming thumbnail saved to toPath")
}
else {
print("\(error)")
// Assuming thumbnail could not be generated
}
}
}
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!