简体   繁体   English

Dropbox SDK-Swift-(415)不支持的媒体类型

[英]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: 我在iOS swift应用程序中使用DropboxSDK,当我尝试下载缩略图时,出现(415)不支持的媒体类型错误:

2015-10-24 20:10:23.732 PhotondRoll[55084:2520699] [WARNING] DropboxSDK: error making request to /1/thumbnails/dropbox/Pictures/2015/0123. 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) Unsupported Media Type Pache / 20150123_211742443_iOS.jpg的电影院-(415)不支持的媒体类型

This is the line I'm using to download the thumbnail. 这是我用来下载缩略图的行。 The rest of the code was created following the Dropbox getting started guide. 其余代码是根据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)
}

Could you help me? 你可以帮帮我吗?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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