以编程方式将文件上传到Google文档 [英] Uploading files to Google docs programmatically
问题描述
我的Ebooks文件夹中有许多大约50GB的pdf文件. 现在我想将它们上传到Google文档中,例如Linux的Rsync. 是否可以使用php或python中的脚本,该脚本会将Ebooks文件夹中的所有pdf文件和子文件夹上载到Google文档.
I have many many pdf files around 50GB in my Ebooks folder. Now i want to upload them in Google docs like Rsync of Linux. Is it possible to have the script in php or python which uploads all pdf files in Ebooks folder and subfolders to Google docs.
现在的问题是,我需要多次重新启动计算机,并且我希望该脚本应该从以前文件所在的位置开始,这样我就不需要手动进行文件选择了.有可能
Now the problem is i need to restart computer many times and i want that script should start from where it was left with previous file so that i don't need to manually make selection of files. is it possible
推荐答案
您将使用 Google文档API ,以使用带有数据的简单HTTP POST上传它们.以下是有关如何上载和转换文档的说明: http://code .google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingDocs
You'd use the Google Documents API to upload them using a simple HTTP POST with the data. Here's an explanation how to upload and convert documents: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#UploadingDocs
该链接将为您提供示例,以及您需要做的一切.
The link will provide you will examples and all you need to do what you were asking for.
更精确地说,这就是您要上载pdf的内容: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#ResumableUploadPUT
To be more precise this is what you are looking for if you want to upload pdf's: http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#ResumableUploadPUT
- Python Google Documents API guide
- PHP Google Documents API guide
这篇关于以编程方式将文件上传到Google文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!