简体   繁体   中英

Dropbox SDK - Swift - (415) Unsupported Media Type

I'm using DropboxSDK in my iOS swift app and when I try to download a thumbnail I receive the (415) Unsupported Media Type error:

2015-10-24 20:10:23.732 PhotondRoll[55084:2520699] [WARNING] DropboxSDK: error making request to /1/thumbnails/dropbox/Pictures/2015/0123. Noche de cine con Pablo/20150123_211742443_iOS.jpg - (415) Unsupported Media Type

This is the line I'm using to download the thumbnail. The rest of the code was created following the Dropbox getting started guide.

if let dirs : [String] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.AllDomainsMask, true) {
    let dir = dirs[0] //documents directory
    dropboxRestClient.loadThumbnail(metadata.path, ofSize: "s", intoPath: dir)
}

Could you help me?

我能够解决这个问题,将loadThumbnail调用移到dispatch_async块内。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM