在网站上显示存储在 Google Drive 中的文件(例如图像) [英] Displaying files (e.g. images) stored in Google Drive on a website
本文介绍了在网站上显示存储在 Google Drive 中的文件(例如图像)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否可以在公共网站上访问/显示存储在 Google Drive 中的图像等文件.
I was wondering if its possible to access/display files like images which are stored in Google Drive on a public website.
推荐答案
一种解决方法是使用 Google Drive SDK API
获取 fileId
,然后使用此 网址
:
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}
这将是您在 Google 云端硬盘中的文件(图片或其他任何内容)的永久链接.
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.
这篇关于在网站上显示存储在 Google Drive 中的文件(例如图像)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文