且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从 Google Drive API 获取图像文件 URL

更新时间:2023-02-23 19:52:29

答案:

这是不可能的.

Google Drive 不是文件托管服务.请记住这一点很重要,因为它并非旨在让您托管文件以在您的网站/应用程序/上使用其他.要正确执行此操作,您应该使用不依赖 Google Drive 环境的专用文件托管服务.

Google Drive is not a file hosting service. This is important to remember because it is not designed to allow you to host files for use on your website/app/other. To do this properly you should use a dedicated file hosting service which doesn't rely on the Google Drive environment.

图片网址经过混淆处理,无法检索.您可以做的***的事情是使用 viewpreview 链接,它们仅在 discord UI 中显示缩略图.

The image URL is obfuscated and not retrievable. The best you can do is use the view or preview links which show only a thumbnail in the discord UI.

查看链接:

https://drive.google.com/file/d/file-id/view

预览链接:

https://drive.google.com/file/d/file-id/preview