How to use share or link a file from Google Drive to website or blogs for direct download?

direct-download-from-google-drive-on-websites-blog

Many people use Gmail or Google Account nowadays and with Google Account comes a lot of other free Google products. Google Drive is one of them . Google Drive nowadays to keep files online and for sharing. Google Drive allows you to create documents, presentations, drawings, and folders. But you already know that, don't you? For website owners or bloggers, Google Drive can be used as a file storage for linking to websites too! In this post, we shall see how to share a file from Google Drive for direct download on websites or blogs.


Advantages of using Google Drive as file storage for websites and blogs
There are certain practical uses and advantage where Google Drive (or any other cloud storage ) can be used as file storage for websites and blogs.
  • When you have a shared hosting plan with limited storage space.
  • When your web host do not allow uploading of files larger than X MB etc.
  • When you blog on free blogging platforms such a Blogger which do not allow direct link upload. Since Blogger is a Google Product, it is best for Blogger users to use Google Drive.
  • And may be more reasons.
Websites and blogs can get the link to files from Google Drive and put in on website and blog so that user's can view or download files directly from Google Drive. This will save small website owners bandwidth, storage space and even avoid limited file upload issues with shared hosting. Another advantage is that the files will stay on your Google Drive account even if the website domain is expired.

How to share files from Google Drive to website or blogs?

The first thing to do is to upload the file to Google Drive, which is easy. We just have to sign in to Google Drive with our Google Account and upload the file. For better organization, it is advisable to create appropriate folders first and then upload the file to its respective folders.


By default the file we upload to Google Drive will be Private – Only you can access. So to share on website or blogs (public) we need to change the visibility settings for the file.

Changing the visibility of the file uploaded to Google Drive:
  •     Right-click on the target file and click on "Share"
  •     Then click on "change" next to "Private – Only you can access"
  •     Set the "visibility" to "Anyone with the link"
google-drive-file-visibility-options

  •     Copy the link and paste it in website and blogs etc.
google-drive-file-share-direct-download_copy_link


But when we access the file from outside Google Drive (such as website or blog) , the file will open the file on Google Drive in a browser.

If you want to let users directly download the file from Google Drive instead of viewing in a web browser, do the following:

The default Google Drive file link looks like this:

    https://drive.google.com/file/d/FILE_ID/edit?usp=sharing

Change it to:

    https://drive.google.com/uc?export=download&id=FILE_ID


In the example above, if "https://drive.google.com/file/d/0B-DrVHzCC8pUbVc4anhwZDU0bWs/edit?usp=sharing" is the file URL copied from Google Drive, then "0B-DrVHzCC8pUbVc4anhwZDU0bWs" is the FILE ID.

With the new format, the link shared will download the file directly to the recipient's computer instead of opening the file on Google Drive in a browser.

No comments