0

I tried with google API and generated downloadable public link. For small files, it is working perfectly and getting redirected and downloading.

But in the case of files > 25 MB, a pop up (virus scan popup) is shown instead of direct download. Is there any methods to bypass this popup?

kkr
  • 115
  • 1
  • 14
  • You can use this method for downloading the publicly shared content. https://stackoverflow.com/a/48133859/7108653 But in this case, the created URL is the temporal. If you want to permanently use the URL, how about using API key? But if this was not the direction you want, I apologize. – Tanaike Dec 09 '19 at 08:06
  • @Tanaike thanks for the response. I would like to know some things related to that, by using API key, is it possible to generate public downloadable link through google APIs using python. (anyone with the link should be able download the file, no popups -- even if the file is larger than 25 MB ) – kkr Dec 09 '19 at 09:01
  • Thank you for replying. I proposed the endpoint using API key as an answer. Could you please confirm it? If I misunderstood your replying and that was not the direction you want, I apologize. – Tanaike Dec 09 '19 at 12:21

1 Answers1

0

When the API key is used for downloading the publicly shared file, how about this answer? At webContentLink like https://drive.google.com/uc?id=### fileId ###&export=download, such issue occurs. So in this case, it uses the method of Files: get in Drive API.

Endpoint:

https://www.googleapis.com/drive/v3/files/### fileId ###?alt=media&key=### API key ###

Sample curl command:

curl "https://www.googleapis.com/drive/v3/files/### fileId ###?alt=media&key=### API key ###"
  • Of course, you can download the file by accessing to the endpoint of https://www.googleapis.com/drive/v3/files/### fileId ###?alt=media&key=### API key ### with your browser.

Note:

  • In above endpoint, the file is required to be shared publicly. Please be careful this.
  • In this case, Drive API is used. So please enable Drive API at API console.

References:

Tanaike
  • 181,128
  • 11
  • 97
  • 165