久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

從 Google Drive API 獲取圖像文件 URL

Getting a image file URL from the Google Drive API(從 Google Drive API 獲取圖像文件 URL)
本文介紹了從 Google Drive API 獲取圖像文件 URL的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試從 Google Drive API 獲取圖像文件 URL.不是 webViewLink 或 webContentLink.

I am trying to get the image file URL from the Google Drive API. Not the webViewLink or webContentLink.

背景故事與問題無關,但有助于解釋情況.我在 Node.js 中制作了一個 Discord 機器人,而 Discord 不遵循重定向,所以我需要 Discord 可以識別為帶有原始圖像文件的 URL 的東西.我嘗試過其他方法,例如嘗試發送 base64 文件,但最好使用圖像文件 URL.

The backstory doesn't really matter to the issue but it will help explain the situation. I am making a Discord bot in Node.js and Discord doesn't follow redirects, so I need something that Discord will recognize as a URL with a raw image file. I have tried experimenting with other methods such as trying to send a base64 file, but a image file URL would be best.

我看過另一個 StackOverflow 主題的類似主題,但那里的解決方案無法實現我認為作者的意圖.

I have seen the other StackOverflow thread with a similar topic, but the solutions there don't manage to achieve what I think the author was intending.

另外,我說過 Discord 不能跟蹤重定向,但如果有可行的解決方案,我可能會在服務器端進行.

Also, I said Discord can't follow redirects, but I could potentially do it server-side, if there is a solution that works.

推薦答案

答案:

這是不可能的.

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

這篇關于從 Google Drive API 獲取圖像文件 URL的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: 成人羞羞国产免费视频 | 亚洲www.| 日韩精品一区二区三区四区 | 亚洲色综合 | av中文字幕网站 | 91大神xh98xh系列全部 | 国产成人精品久久 | 国家aaa的一级看片 h片在线看 | 成人在线观看免费 | 精品一级 | 中文字幕在线中文 | 国产亚洲精品久久久久久豆腐 | 精品国产乱码久久久久久中文 | 亚洲欧美日韩精品久久亚洲区 | 91日日| 日韩在线观看中文字幕 | 国产精品美女 | 精品婷婷| 91视视频在线观看入口直接观看 | 成人免费视频在线观看 | 久久一二区 | 国产精品波多野结衣 | 香蕉视频一区二区 | 成人三区 | 看片wwwwwwwwwww| 国产免费a | 国产福利一区二区 | 91精品国产一区二区三区 | 91资源在线| a视频在线观看 | 亚洲第一黄色网 | 久久久成人动漫 | 午夜精品久久久久久久久久久久久 | 日韩在线视频网址 | 一区日韩 | 亚洲视频中文字幕 | 亚洲最大的黄色网址 | 成人伊人 | 国产一区二区三区在线视频 | 精品久久一区 | 理论片免费在线观看 |