If you are using Google Drive and are having issues with Google Drive cannot upload files, here are some effective solutions to fix the issue. Can’t Upload Files to Google Drive? Here are a Few Fixes. By MTE Staff – Posted on Jun 24, 2018 Jun 26, 2018 in Internet. Sorry, you can't view or download this file at this time is an error message that you may get when you try to download files on Google Drive. The explanation for the. Google Drive is a massive cloud storage service that offers 15 GB of free space across Google Drive, Gmail, and Google Photos. It also includes Google Docs, Sheets and Slides, where you can edit.
- Cannot Download Files From Google Drive
- Can't Download Files From Google Drive To Chrome
- Google Drive Won't Download Files
- Can't Download Files From Google Drive To Computer
- I Can T Download Files From Google Drive
Directly Save Web Files to Google Drive without Downloading Learn the simple way to save web files to Google Drive or other cloud drives instantly without the need to download and upload step by step.
My desktop application, written in java, tries to download public files from Google Drive. As i found out, it can be implemented by using file's
webContentLink
(it's for ability to download public files without user authorization).So, the code below works with small files:
But it doesn't work on big files, because in this case file can't be downloaded directly via
webContentLink
without user confirmation with google virus scan warning. See an example: web content link.So my question is how to get content of a public file from Google Drive without user authorization?
Philip Voronov
Philip VoronovPhilip Voronov
11 Answers
Update December 8th, 2015According to Google Support using the
method will be turned off on Aug 31st, 2016.
I just ran into this issue.
The trick is to treat your Google Drive folder like a web host.
Update April 1st, 2015
Google Drive has changed and there's a simple way to direct link to your drive. I left my previous answers below for reference but to here's an updated answer.
- Create a Public folder in Google Drive.
- Share this drive publicly.
- Get your Folder UUID from the address bar when you're in that folder
- Put that UUID in this URL
https://googledrive.com/host/<folder UUID>/
- Add the file name to where your file is located.
https://googledrive.com/host/<folder UUID>/<file name>
new Google Drive Link.
All you have to do is simple get the host URL for a publicly shared drive folder. To do this, you can upload a plain HTML file and preview it in Google Drive to find your host URL.
Here are the steps:
- Create a folder in Google Drive.
- Share this drive publicly.
- Upload a simple HTML file. Add any additional files (subfolders ok)
- Open and 'preview' the HTML file in Google Drive
- Get the URL address for this folder
- Create a direct link URL from your URL folder base
- This URL should allow direct downloads of your large files.
[edit]
I forgot to add. If you use subfolders to organize your files, you simple use the folder name as you would expect in a URL hierarchy.
https://googledrive.com/host/<your public folders id string>/images/my-image.png
What I was looking to do
I created a custom Debian image with Virtual Box for Vagrant. I wanted to share this '.box' file with colleagues so they could put the direct link into their Vagrantfile.
In the end, I needed a direct link to the actual file.
Google Drive problem
If you set the file permissions to be publicly available and create/generate a direct access link by using something like the gdocs2direct tool or just crafting the link yourself:
https://docs.google.com/uc?export=download&id=<your file id>
You will get a cookie based verification code and prompt 'Google could not scan this file' prompt, which won't work for things such as wget or Vagrantfile configs.
The code that it generates is a simple code that appends GET query variable
...&confirm=###
to the string, but it's per user specific, so it's not like you can copy/paste that query variable for others.But if you use the above 'Web page hosting' method, you can get around that prompt.
I hope that helps!
jmbertuccijmbertucci
Cannot Download Files From Google Drive
If you face the 'This file cannot be checked for viruses' intermezzo page, the download is not that easy.
You essentially need to first download the normal download link, which however redirects you to the 'Download anyway' page. You need to store cookies from this first request, find out the link pointed to by the 'Download anyway' button, and then use this link to download the file, but reusing the cookies you got from the first request.
Here's a bash variant of the download process using CURL:
Notes:
- this procedure will probably stop working after some Google changes
- the grep command uses Perl syntax (
-P
) and theK
'operator' which essentially means 'do not include anything precedingK
to the matched result. I don't know which version of grep introduced these options, but ancient or non-Ubuntu versions probably don't have it - a Java solution would be more or less the same, just take a HTTPS library which can handle cookies, and some nice text-parsing library
Martin PeckaMartin Pecka
I know this is an old question but I could not find a solution to this problem after some research, so I am sharing what worked for me.
I have written this C# code for one of my projects. It can bypass the scan virus warning programmatically. The code can probably be converted to Java.
Süleyman Yasir KULASüleyman Yasir KULA
This seems to be updated again as of May 19, 2015:
How I got it to work:
As in jmbertucci's recently updated answer, make your folder public to everyone. This is a bit more complicated than before, you have to click Advanced to change the folder to 'On - Public on the web.'
Find your folder UUID as before--just go into the folder and find your UUID in the address bar:
Then head to
It will redirect you to an index type page with a giant subdomain, but you should be able to see the files in your folder. Then you can right click to save the link to the file you want (I noticed that this direct link also has this big subdomain for
googledrive.com
). Worked great for me with wget
.This also seems to work with others' shared folders.
e.g.,
maps to
And a right click can save a direct link to any of those files.
SeanSean
#Case 1: download file with small size.
- You can use url with format https://drive.google.com/uc?export=download&id=FILE_ID and then inputstream of file can be obtained directly.
#Case 2: download file with large size.
- You stuck a wall of a virus scan alert page returned. By parsing html dom element, I tried to get link with confirm code under button 'Download anyway' but it didn't work. Its may required cookie or session info.enter image description here
- Finally I found solution for two above cases. Just need to put
httpConnection.setDoOutput(true)
in connection step to get a Json.)]}' { 'disposition':'SCAN_CLEAN','downloadUrl':'http:www...','fileName':'exam_list_json.txt', 'scanResult':'OK', 'sizeBytes':2392}
Then, you can use any Json parser to read downloadUrl, fileName and sizeBytes.
- You can refer follow snippet, hope it help.
And
Noi DoanNoi Doan
pinoyyidpinoyyid
Can't Download Files From Google Drive To Chrome
I used this command line tool to download files from Google Drive. Just follow the instructions in Getting Started section and you should download files from Google Drive in minutes.
ibrahimibrahim
I would consider downloading from the link, scraping the page that you get to grab the confirmation link, and then downloading that.
If you look at the 'download anyway' URL it has an extra
confirm
query parameter with a seemingly randomly generated token. Since it's random...and you probably don't want to figure out how to generate it yourself, scraping might be the easiest way without knowing anything about how the site works.You may need to consider various scenarios.
That Umbrella GuyThat Umbrella Guy
If you just want to programmatically (as oppossed to giving the user a link to open in a browser) download a file through the Google Drive API, I would suggest using the
downloadUrl
of the file instead of the webContentLink
, as documented here: https://developers.google.com/drive/web/manage-downloadsDavidDavid
https://drive.google.com/uc?export=download&id=FILE_ID replace the FILE_ID with file id.
if you don't know were is file id then check this article Article LINK
Google Drive Won't Download Files
Mohammed RaqeebMohammed Raqeeb
I simply create a javascript so that it automatically capture the link and download and close the tab with the help of tampermonkey.
Similarly you can get the html source of the url and download in java.
SmartManojSmartManoj
protected by Community♦Jan 24 '17 at 10:40
Can't Download Files From Google Drive To Computer
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?