1

I am showing images on my web application using this

https://drive.google.com/uc?id=photoID

I am uploading the images on my Google Drive by Google Drive API and then grab the photoID of each uploaded image and then showing them on my web app placing it like this https://drive.google.com/uc?id=photoID. So my question is how much reliable is this approach? Before I have used Facebook url and later those links were no longer available because they are just temporary CDN urls, this time I don't want to made the same mistake again.

Thanks.

Avow Studio
  • 87
  • 3
  • 8

1 Answers1

2

Each file in Google Drive has its own id.

Therefore, as long as the file is still stored in the Drive, you will be able to retrieve it and use it for your web application.

According to the Drive documentation:

File IDs are stable throughout the life of the file, even if the file name changes. Search expressions are used to locate files by name, type, content, parent container, owner, or other metadata.

Reference

ale13
  • 5,679
  • 3
  • 10
  • 25
  • Thanks for your answer. I have seen that each id has it's own quota limits. So If a single image id uses by so many users then it will stop showing in a certain period of time right? So do you know the quota limit for each id? And what exactly happens when a single id cross it's quota limit? Just stop appearing or what? – Avow Studio Sep 15 '20 at 11:23
  • Can you share the link/documentation where you found this information? @AvowStudio – ale13 Sep 15 '20 at 11:26
  • Sure here it is. https://stackoverflow.com/a/11855448/4699093 `Note: this link seems to be subject to quotas. So not ideal for public/massive sharing.` He says. – Avow Studio Sep 15 '20 at 11:42
  • You probably are not having any problem if you have a small requests but as you have mentioned in other post, Google Drive is not thought for being a CDN so there could be some problems. Not much you can do about it, there are some other solutions like [Cloud CDN](https://cloud.google.com/cdn) you can use if this photo is crucial to be accesible. – Raserhin Sep 17 '20 at 09:10