When I get a file's metadata using Google drive REST API, there is no field like embedLink in file's resource. While in documentation of file resource it is mentioned that this field is meant for embeddable link. How do I get this field in my file's resource?
Thanks in advance.
Only files with known mime types contain an embedLink such as Docs files and files that can be previewed with Drive's Preview app.
Related
How to download a file from Google Drive using the Camel Google-Drive component?
Using the URI google-drive://drive-files/get?fileId=validfileID12345 results in only the metadata of the specified file.
How would I use the Google Drive component to download the file and pass it to the next component in the route?
Try adding alt=media to the URL. See https://developers.google.com/drive/v2/reference/files/get for details
Im building an application in nodejs that uploads documents to google drive, how can i convert the document to google docs format before uploading it or while uploading it.
You want to specify convert = true when doing the insert. See https://developers.google.com/drive/v2/reference/files/insert
When I have a File in Google Drive that is a native Google Docs document, then I have access to exportLinks for different mime-types, also for PDF;
But I have MSWORD documents that have been generated. The exportLinks property is always null for MSWORD document. In the web interface I can print which downloads a perfectly converted PDF document.
Question: can I generate a PDF from a MSWORD file somehow using the SDK ?
Been up and down through the docs looking for clues.
The download/print link downloads from a real long URI :
https://doc-0o-a0-docsviewer.googleusercontent.com/viewer/securedownload/1ve0rd17der7n5d32lker62ffdq2175h/<randomstring>/<longnumber>/<randomstring>=/<randomstring>/<randomstring>==?docid=<randomstring>&chan=<randomstring>&dom=<googleappsdomain>&sec=<randomstring>&a=gp&filename=<filename>&nonce=<nonce>&user=<userid>&hash=<hasvalue>
anybody ?
Thx
ExportLinks are only provided for documents in Google-native formats, so you'll have to convert the MS Word document to Google Docs before you can export it as pdf (and other supported file formats).
Following the Hello world application and using the File Picker, I am able to get a google drive file information.
I would like to get the download url of this file (it is a binary file) in a my web application.
Is there any way to get it with the new javascript sdk?
Yes.
The Picker returns the id string. Use this to get the item object (https://developers.google.com/drive/v2/reference/files/get) which will contain a variety of download URL's depending on your precise requirement.
I have been working on Google Drive API. Is there a way to get page size of the documents?(PDF, MS Docs)
The google drive api is a file store api. Its basically a directory api. It stores the files in folders and can give you information about the files itself.
"name": string,
"mimeType": string,
"description": string,
It will allow you to upload and download files to this directory. It does not give you more information beyond that.
You cant read the contents of the file or the settings of the file in anyway with this api.