Use the Google Docs API to upload any type of file

Can I download any type of file from Google Docs using the Google Docs API? (jpg, zip, txt)

I can figure out how to upload word, powerpoint and excel files, but I want to be able to upload and download files of any type in Google Docs. I know that it is possible to do this with the online bootloader, but it seems that it cannot make the boot part work with the API.

I am using the Java shell for the API. Can I use the Java API version to download all types of files?

+4
source share
2 answers

Since the last answer was written, this API is deprecated. There's a sample Java code on the Google Dev page for the (newer) Google Drive API for managing downloads from Google Docs.

This handles a large number of MIME types.

+1
source

See this page http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html

and this is for the specific download of documents and files http://code.google.com/apis/documents/docs/3.0/developers_guide_protocol.html#DownloadingDocsAndFiles

The document containing the XML returned by google has a file type and a URL to download the file to node. You can use the URL to download the contents of the file.

+1
source

Source: https://habr.com/ru/post/1305696/


All Articles