无法获得谷歌驱动器js文件上传示例工作

时间:2013-03-21 16:08:13

标签: google-drive-api

https://developers.google.com/drive/quickstart-js

我遵循(c / p)示例,一切正常(auth等),直到我到达提交文件的程度。我从驱动器获得的唯一响应是400:错误请求 - 无效的多部分请求,包含0个mime部分。

这是我的请求标题:

主持www.googleapis.com

User-Agent Mozilla / 5.0(X11; Linux x86_64; rv:12.0)Gecko / 20100101 Firefox / 12.0

接受text / html,application / xhtml + xml,application / xml; q = 0.9, / ; q = 0.8

Accept-Language en-gb,en; q = 0.5

接受编码gzip,deflate

连接保持活力

Content-Type multipart / mixed;字符集= UTF-8;边界= “------- 314159265350000023846”

授权持有人ya29.AHES6ZSUZuBpl00000kTgoNfAsfgiffGPKl-TsIeoT0b00000qcoiWE

X-ClientDetails appVersion = 5.0%20(X11)& platform = Linux%20x86_64& userAgent = Mozilla%2F5.0%20(X11%3B%20Linux%20x86_64 %3B%20rv%3A12.0)%20Gecko%2F20100101%20Firefox%2F12.0

X-JavaScript-User-Agent google-api-javascript-client / 1.1.0-beta

X-Origin http://xxx.com

X-Referer http://xxx.com

X-Goog-Encode-Response-If ... base64

Referer features_%2Fam%3DQQ%2Frt%3Dj%2Fd%3D1%2Frs%3DAItR000000MKD-NmdZUrhxHhwd0000eNMw“> https://www.googleapis.com/static/proxy.html?jsh = m%3B%2F_% 2Fscs%2Fapps静电%2F_%2Fjs%2FK%3Doz.gapi.en.Y3In_W4Itv8.O%2FM%3D_ 功能 _%2Fam%3DQQ%2Frt%3DJ%2FD%3D1%2Frs%3DAItR000000MKD -NmdZUrhxHhwd0000eNMw

内容长度848332

Pragma no-cache

缓存控制无缓存

想法? 它可能是一个unicode的东西? 感谢

1 个答案:

答案 0 :(得分:0)

Yay证明上传的html代码因为char设置问题而被破坏。现在有效。