We have a requirement where we should provide capability to upload files up to 100 GB size. Current flow which we have is to put the file from client location/local system to the application server. Then application server pushes the file to a service account in Google Drive server. I would like to know if there is a way to push the file from local system directly to service account in Google Drive. This would help us to not have to store such big files in application server. Anyone has any suggestion on this ?
Service accounts are not meant to be used like this. They have limited quota: Google Drive Service Accounts Additional Storage
Related
What will extra setting to get files / folder from google drive API with service account? Currently getting empty results.
Same code working with credential web scope with client id and secrets key but not with service account.
When you use a web client. It pops up and requests authorizaiton. In this way a user is granting your application access to their data. So a file.list will return the files on the users google drive account.
The same thing is happening with your service account. Only service accounts are pre authorized. Your file.list is returning no files becouse the service account doesnt have acess to any files yet. You see it has its own drive account.
Options.
Upload files to the service accounts drive account.
open your credetials.json file. Look for the service account email address. Take that address and share a directory or file on your personal drive account with the service account.
Now do a file.list. It should have files.
Hi i'm trying to make my own cloud web service that uses python google drive API.
what i'm trying to make is basically cloud service but can also interact with Google Drive.
To do that, my web service users have to have their own 'storage.json' file in their server's virtual directory (which really stores in server).
when I somehow get my own 'storage.json' file, (I followd: https://developers.google.com/drive/api/v3/manage-uploads)
and upload 'storage.json' file to my directory like User1, upload and download with Google drive works just fine.
but my final goal is when my user doesn't have 'storage.json' file in their directory like User2, I want browser to pops up in User2's computer and User2 can follow the google's authentication flow and finally download 'storage.json' file into server's ~/User2/ directory.
Do you think this is possible? or if there are better ways, can you notice me? thank you
I have an app setup with the Web-Client structure, using it as a kind of server manager for many users. They can't access the account but only some folders, as I do all the authorization steps by code. I chose this kind of account in Drive API so I could upload big files, as service accounts were very limited. But now there are some files that can be uploaded through the Web drive.google.com domain, and I need to own this files that the e-mails from my same domain have uploaded. So I was thinking if it was possible to have a service account to change permissions only, and do all the file uploads though the Web-Client Account within the same project and email? Thanks.
Suppose I want to write a tool which allows the user to copy a file from Dropbox to Google Drive but I don't want to download the file first to my server and then upload it to the drive. Is there a way where I can insert a file to drive by just providing a URL? I couldn't find anything in the documentation.
No.
Having said that, it isn't necessary to create a file on your server. You can buffer the content in memory.
I suppose you could send the access token to the client via a POST request. You'd have to encrypt it, of course, preferably SSL. Then the client could use the Drive SDK to upload the file directly from itself, completely bypassing your server.
I'm trying to make a service that runs on a webserver and can upload files to Google Drive,
so that people can sync the files to local-drive using the Google desktop application.
So I tried the Drive API but it requires a webbrowser to authenticate.
This would be a possibility, but I don't know to get the access token programmically.
Even if I had the access token, I wouldn't know if it just works forever.. It seems to have an expire date?
I wouldn't want the service to suddenly not working, because the token has expired.
Than I learned about Service Account, and finally got it working, but it seems to have its own space that i can only access with the service account.
I don't know how to share the files from the service account to a regular account, as people need to sync it locally.
So a found a video about user impersonation, in which he showed a page about given access to a service account to impersonate another user.
But i don't know where to find this page.
Looking at: http://support.google.com/a/bin/answer.py?hl=en&answer=162106&topic=2759255&ctx=topic
It says it's in Advanced Tools > Manage third party OAuth client access (under the Authentication section).
But where is the Authentication section? Do I need to create a Google App to do this?
The question is: How upload files programmically to Google Drive without any user intervention, so that they can be synced locally with the drive desktop-application.