如何通过gdata python客户端将pdf和pptx文件上传到google docs?
我正在将 gdata python 客户端用于项目的 google docs api。我使用 oauth 身份验证和所有舞蹈,并已成功上传 .doc、.xls 以及 他们的常见问题解答。 但是我似乎无法上传pdf文件,即使它就在那里,列在支持的文件类型上。我尝试使用最新版本的 gdata(上周发布),但没有成功。另外,我希望能够上传 .pptx 文件,尽管我意识到该扩展名不受支持。
有没有人通过 gdata python 客户端成功上传 pdf 文件到 Google 文档?
I'm using the gdata python client for the google docs api for a project. I use oauth authentication and all the dance, and have successfully uploaded .doc, .xls and every file type in Their FAQ.
but I cannot seem to upload pdf files, even though is right there, listed on the supported filetypes. I tried with the latest version of gdata (released last week) to no avail. Also, I'd like to be able to upload .pptx files, though I realize that that extension is not supported.
Has anybody out there succesfully uploaded a pdf file to google docs via their gdata python client?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
完毕。
首先做了这个
http://code.google.com/p/ gdata-issues/issues/detail?id=591#c77
但是现在我收到错误请求错误
“无效的请求 uri”
。因此,我在另一个 google 线程中发现 v3.0 api 的 uri 不再是http://docs.google.com/feeds/folders/private/full/
> 但是http://docs.google.com/feeds/default/private/full//contents
黑掉了我的 gdata 副本以替换
文件夹
使用default
并附加/contents
瞧,现在它适用于 pdf 和所有其他受支持的内容。还没解决pptx问题...
Done.
First did this
http://code.google.com/p/gdata-issues/issues/detail?id=591#c77
but now I was getting a bad request error
"invalid request uri"
. So I then discovered in another google thread that the uri for the v3.0 apis was no longerhttp://docs.google.com/feeds/folders/private/full/<resource-id>
buthttp://docs.google.com/feeds/default/private/full/<resource-id>/contents
Hacked my copy of gdata to replace
folders
withdefault
and append/contents
and voilà, now it worked for pdfs and all the other supported stuff.Haven't solved the pptx issue, though...