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.
Related
In the latest Google Drive API update, they want us to provide them with a resourceKey, when we want to access the Google Drive shared link. They said they put the resource key in the metadata of the files, but when I get the metadata of the files, there is no resourceKey attribute in there. So, do you guys know how to get the resourceKey of the file?
Metadata request code :
$fileID = substr($url,strpos($url,'=')+1,33);
$metadata=\Illuminate\Support\Facades\Storage::disk("google")->getMetaData($fileID);
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 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.
I have little question. Is there any way (I read API, but maybe...) how to list files in folder using only Google Drive API? I mean without scopes Documents List API.
If I send request GET https://www.googleapis.com/drive/v2/files then I get all files and folders in my Google Drive, but I want to show only files which is inside specific folder.
My english is bad, but I hope you understand me.
If not any way to do this, then I must use Documents List API.
Thanks for answers
PS: I make app in C++/QT for MeeGo and Symbian OS mobile systems
Solved. I must use Search string parameters with =q
The api's for SkyDrive and Dropbox have options for managing the user's entire drive. For Google Drive, the drive.file scope seems to give only access to the files created by the app.
Is there a scope for Google Drive that gives access to the entire drive?
Edit: The below answer was correct, but the latest version of the Drive API allows requesting of a full scope with https://www.googleapis.com/auth/drive. The Documents List API is no longer needed for this use case. See https://developers.google.com/drive/scopes#requesting_full_drive_scope_for_an_app
To be precise the Drive API gives access to Files created by the app and files that the user has opened with the app from the Drive UI (through open-with).
To manipulate all of the Drive files of the user you can use the Google Document List API . Though we currently forbid Drive applications (the ones that have get integrated in the Drive UI through the Open-with and Create dialogs) to request access to the Document List API as we want to keep Drive application on a per-file security model. (Basically adding the Document List scope in the Drive SDK settings raises an error).