Vahagn
Vahagn

Reputation: 105

How to upload a file to google disk api

I have web site with many images, I want to upload all the images to google disk, can you help me, how I can download file from url to google disk, without downloading to my host and after upload to google disk.

for example yandex disk have this api but in google I can't find enough details

Upvotes: 0

Views: 634

Answers (1)

Iman Mirzadeh
Iman Mirzadeh

Reputation: 13550

1- you can use PyDrive
this is how it works:

from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive

gauth = GoogleAuth()
gauth.LocalWebserverAuth()
drive = GoogleDrive(gauth)
my_file = #the file you want to be uploaded or sth else
my_file.Upload() 

2- or you can also run your app without help of wrappers which is well documented by google here for submit your app and then here for upload

Upvotes: 1

Related Questions