I was wondering if its possible to access/display files like images which are stored in Google Drive on a public website.
Go to drive.google.com, right-click any image file, and choose Get Link to get a shareable link of that image. Make sure that the access is set to Anyone on the internet with this link can view. Paste that file link in the box below to generate the HTML embed code.
A workaround is to get the fileId
with Google Drive SDK API
and then using this Url
:
https://drive.google.com/uc?export=view&id={fileId}
That will be a permanent link to your file in Google Drive (image or anything else).
Note: this link seems to be subject to quotas. So not ideal for public/massive sharing.
Here's the simple view link:
https://drive.google.com/uc?id=FILE_ID
e.g. https://drive.google.com/uc?id=0B9o1MNFt5ld1N3k1cm9tVnZxQjg
You can do the same for other file types, e.g. MP3, PDF, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With