cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Are you an educator? Well we want to hear from you, so check out some tools we think might help you out 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: 

Video thumbnails

Video thumbnails

Petar N.
New member | Level 1

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?

3 Replies 3

Re: Video thumbnails

Greg-DB
Dropboxer

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.

Re: Video thumbnails

sigrem
New 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

            }

        }

    }

Re: Video thumbnails

Greg-DB
Dropboxer

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!

Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    sigrem New member | Level 1
What do Dropbox user levels mean?
Need more support?