問題描述
google 是否有任何 URL 包含文件的原始數(shù)據(jù)?使用 https://drive.google.com/file/d/FILE_ID
只會將您帶到文件的共享"部分...假設(shè)我在 GDrive 上有一個(gè) .js 文件.如果你去他們的分享鏈接,他們有一個(gè)分享頁面.是否有任何鏈接可以從文件中獲取原始 javascript,以便在 <script src="google_link_or_whatever">
中使用?
Is there any URL google has that contains the raw data for the file? using https://drive.google.com/file/d/FILE_ID
just takes you to a 'share' section of the file... say I have a .js file on GDrive. If you go to their share link, they have a share page. Is there any link to get the raw javascript from the file, as to use in a <script src="google_link_or_whatever">
?
推薦答案
注意 - 這是解決方案,但它不再有效 - 請參閱下面@Bobby Fritze 的評論
NOTE - THIS WAS THE SOLUTION BUT IT NO LONGER WORKS - SEE COMMENT BY @Bobby Fritze below
無需 API 和 JS.確認(rèn)現(xiàn)在正在使用最新版本的云端硬盤.如果您的服務(wù)器不使用 https,但供應(yīng)商插件需要 https 來調(diào)用 CSS 或其他文件,則很好的解決方法:
No API's and no JS necessary. Confirmed now working on latest version of Drive. Great workaround for if your server doesn't use https but a vendor plugin demands https to call in a CSS or other file:
- 在包含您想要的文件(例如 FILE.css)的文件夾上,點(diǎn)擊共享設(shè)置,然后點(diǎn)擊高級,然后選擇在網(wǎng)絡(luò)上公開 - 互聯(lián)網(wǎng)上的任何人都可以找到和查看".
- 在網(wǎng)址欄(或分享鏈接)中,復(fù)制 drive.google.com/drive/u/0/folders/之后的所有內(nèi)容
- 使用該 ID 替換以下中的 XX-XXXXXXXXXXXXX:http://googledrive.com/host/XX-XXXXXXXXXXXXX/FILE.css
- 導(dǎo)航到第 3 步中附加的 URL,您現(xiàn)在將看到您的原始數(shù)據(jù).
我的用例如下:
<script type="text/javascript">
var vsDisableResize = false;
var vsCssUrl = 'https://cbe7c864b9c1ae8d5be60c7fed3e467334a04d2f.googledrive.com/host/0B9ngkmVbo5T7TDhTTU81M25iNnc/cart.css';
var vsWineryId = '850';
var vsWineListId = '71';
感謝@chris.huh:https://productforums.google.com/forum/#!topic/drive/MyD7dgLJaEo
Credit to @chris.huh at: https://productforums.google.com/forum/#!topic/drive/MyD7dgLJaEo
這篇關(guān)于谷歌云端硬盤原始數(shù)據(jù)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!