Akhil Sundar
Akhil Sundar

Reputation: 1317

python upload image from a url to google drive api

For my Python app,I had completed the basic settings to interact with google drive api and found it working by a test upload of a CSV file. Now I need to upload an image from a url to a newly created folder named 'myappname' in Google Drive.

Thanks in advance

Upvotes: 3

Views: 1921

Answers (1)

JunYoung Gwak
JunYoung Gwak

Reputation: 2987

For now, there is no way you can directly upload file from url. There are two workaround I can think of

  1. Download file and upload it back using Files.insert()
  2. Use Save to Drive button

Using save to Drive button requires user interaction to click the button which might not be the one you want. In that case, downloading and uploading is the only way I can think of.

Upvotes: 2

Related Questions