【发布时间】:2016-10-07 15:29:15
【问题描述】:
RequestResult strReq = OAuthUtility.Put(
"https://content.dropboxapi.com/1/files_put/auto/",
new HttpParameterCollection {
{"access_token",MYAccessToken},
{"path",Path.Combine(this.CurrentPath, Path.GetFileName(@"C:\test\jj.kk\Downloads\1990480.jpg")).Replace("\\","/")},
{"overwrite","true"},
{"autorename","true"}
}
);
我正在使用上述代码在 Dropbox 上上传文件,但出现以下错误:
远程服务器返回错误:(400) Bad Request。
RequestResult : { "error": "Content-Type (application/x-www-form-urlencoded) 可能不是 (\'application/x-www-form-urlencoded\', \'multipart/form -数据\')" }
Httpheader: {传输编码:分块 连接:保持活动 X-Dropbox-Request-Id: 4029d2ae041cf1f25d8f58d06d158b83 X-Robots-标签:noindex、nofollow、noimageindex 内容类型:应用程序/json 日期:格林威治标准时间 2016 年 10 月 7 日星期五 15:24:17 服务器:nginx }
在 ASP.NET 中有没有其他方法可以在 Dropbox 上上传文件?
【问题讨论】:
标签: oauth-2.0 dropbox-api