How to view or Download Google Drive files on your site


Read {count} times since 2020

Many of you wanted to show images, videos etc… on your site which is uploaded on your Google Drive.

The link of the file will not be the same at all times due to security reasons. 
So Google provides another method to show or download a file.
For this method you need to get the file id. For that open your file. 
Look at the url box of your browser.
As shown in the image you should select the word before /edit and after d/.
This selected text will be the file id. Copy the file id.

To View

https://drive.google.com/uc?export=view&id=fileid

Replace the red text with the file id. You can use this url to show an image or any other file.
An Example:

To Download

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


Replace the red text with the file id. You can use this url to download a file.
<div class="separator" style="clear: both;">
  An Example:
</div>

<blockquote class="tr_bq">
  <p>
    <a href="https://drive.google.com/uc?export=download&id=0B2VjYaTkCpiQT0tRSWQzVHMxR1U">Download this file</a>
  </p>
</blockquote>

<div class="separator" style="clear: both;">
  This method helped me a lot for developing <a href="http://games-subins.hp.af.cm/" >Subins Games</a>.
</div>
Show Comments