Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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, tiff, tif, gif and bmp. Photos that are larger than 20MB in size won't be converted to a thumbnail."
We have tried using it for videos and it works fine, but we would like to be certain that we can rely on it, so we are wondering why videos aren't mentioned under the API description?
As you noticed, the actual thumbnail functionality in the API works with more file types than officially documented (like videos) as we've improved the back end over time. Right now, I only recommend relying on the officially documented formats working, so if you want to use this functionality for the unofficial types, please code with that in mind.
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
}
}
}
sigrem, please open a new thread with the details of the issue you're having with SwiftyDropbox, including the details of whatever output/errors/crashes you're getting, so we can look into it. Thanks!
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!