谷歌云端硬盘原始数据? [英] Google Drive raw data?

查看:27
本文介绍了谷歌云端硬盘原始数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

google 是否有任何 URL 包含文件的原始数据?使用 https://drive.google.com/file/d/FILE_ID 只会将您带到文件的共享"部分...假设我在 GDrive 上有一个 .js 文件.如果你去他们的分享链接,他们有一个分享页面.是否有任何链接可以从文件中获取原始 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.确认现在正在使用最新版本的云端硬盘.如果您的服务器不使用 https,但供应商插件需要 https 来调用 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:

  1. 在包含您想要的文件(例如 FILE.css)的文件夹上,点击共享设置,然后点击高级,然后选择在网络上公开 - 互联网上的任何人都可以找到和查看".
  2. 在网址栏(或分享链接)中,复制 drive.google.com/drive/u/0/folders/之后的所有内容
  3. 使用该 ID 替换以下中的 XX-XXXXXXXXXXXXX:http://googledrive.com/host/XX-XXXXXXXXXXXXX/FILE.css
  4. 导航到第 3 步中附加的 URL,您现在将看到您的原始数据.

我的用例如下:

<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

这篇关于谷歌云端硬盘原始数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆