Dropbox SDK - Swift - (415) 不支持的媒体类型
Dropbox SDK - Swift - (415) Unsupported Media Type
我在 iOS swift 应用程序中使用 DropboxSDK,当我尝试下载缩略图时收到 (415) 不支持的媒体类型错误:
2015-10-24 20:10:23.732 PhotondRoll[55084:2520699] [警告] DropboxSDK:向 /1/thumbnails/dropbox/Pictures/2015/0123 发出请求时出错。 Noche de cine con Pablo/20150123_211742443_iOS.jpg - (415) 不支持的媒体类型
这是我用来下载缩略图的行。其余代码是根据 Dropbox 入门指南创建的。
if let dirs : [String] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.AllDomainsMask, true) {
let dir = dirs[0] //documents directory
dropboxRestClient.loadThumbnail(metadata.path, ofSize: "s", intoPath: dir)
}
你能帮帮我吗?
我能够解决这个问题,将 loadThumbnail 调用移动到 dispatch_async 块中。
我在 iOS swift 应用程序中使用 DropboxSDK,当我尝试下载缩略图时收到 (415) 不支持的媒体类型错误:
2015-10-24 20:10:23.732 PhotondRoll[55084:2520699] [警告] DropboxSDK:向 /1/thumbnails/dropbox/Pictures/2015/0123 发出请求时出错。 Noche de cine con Pablo/20150123_211742443_iOS.jpg - (415) 不支持的媒体类型
这是我用来下载缩略图的行。其余代码是根据 Dropbox 入门指南创建的。
if let dirs : [String] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.AllDomainsMask, true) {
let dir = dirs[0] //documents directory
dropboxRestClient.loadThumbnail(metadata.path, ofSize: "s", intoPath: dir)
}
你能帮帮我吗?
我能够解决这个问题,将 loadThumbnail 调用移动到 dispatch_async 块中。