I want to have a large file accessible from Heroku for processing which will go a lot faster if it runs on Heroku than locally. I shared the file and got the link https://drive.google.com/file/d/0B9XPKIrgZLLudUxNdTlWVEpFTlE/view. It brings up a page saying it cannot preview, so it gives the option to download. That link is https://docs.google.com/uc?id=0B9XPKIrgZLLudUxNdTlWVEpFTlE&export=download. But then it still gives another page saying it cannot virus scan 97MB and there is yet another button to confirm download. google drive can't scan this file for viruses

If you press this final button in the browser, it will download, but you can't do it from a script because it sets a cookie or something. So how do I get a direct, direct link to a large file in Google Drive?

I found this https://sites.google.com/site/gdocs2direct/ but it just gives the same link above, with the virus scan warning.

I don't have Amazon S3.

  • 2
    I moved the file to Dropbox, got the share link, changed dl=0 to dl=1, used curl -I ... to get the one-time-use redirect link which looks like https://dl.dropboxusercontent.com/content_link/KLQqv4H1FWVaykcQrFGiK0iH9CmVg9xKWwZlLOWbjovWZC6KSYwb5IwVV6GjSlTx/file?dl=1, and then I was able to pass that to the script running on Heroku. It's now running about 10x faster.
    – Chloe
    Nov 25, 2015 at 3:21
  • So this problem with google drive is purely because it is a large file? Where is the size limit?
    – jiggunjer
    Nov 25, 2015 at 5:46

1 Answer 1


The maximum file size that Google will perform a virus scan on is 25MB. Therefore you can not skip the warning about not being able to scan the file as it is automatically generated when the file check takes place.

Source: http://support.google.com/a/answer/172541?hl=en

Not the answer you're looking for? Browse other questions tagged or ask your own question.