问题描述
因此,我要做的是将一些资源文件(.js,.css等)加载到Google云端硬盘.基本上,我想将我的Google云端硬盘用作CDN.这可能吗?当我说一个.js文件时,我想获得一个直接链接( http://drive.google.com/test/test.js ).
So, what I'm trying to do is load up some resource files (.js, .css, etc.) to Google Drive. Basically, I'd like to use my Google Drive this as a sort of CDN. Is this possible? When I upload say, a .js file, I'd like to get a direct link (http://drive.google.com/test/test.js, for example).
推荐答案
使用图像很容易:上载它,然后单击预览.在Chrome(crtl + shift + J)或firefox中,从该图像获取html文本:您将得到类似以下内容:
With images is easy:Upload it, then click preview.In Chrome (crtl+shift+J) or in firefox get the html text from that image: u will have something like:
<img src="https://drive.google.com/thumbnail?id=0B6czwVjwSt48SDJNRWZZWlFmZmM&authuser=0&v=1412661926713&sz=w1475-h579" class="a-c-ub-Aa a-c-Ma-td-Ib" alt="Displaying Koala.jpg" aria-hidden="true">
然后在其他标签中打开该URL(仍然使用您的gmail帐户),您会注意到您将打开图像并获取新的URL.可以使用未经身份验证的Google帐户打开此新网址...这意味着它是公开的.....
Then open that url in other tab (still using your gmail account), you will notice that you will open the image and obtain a new URL.This new URL is visible to open with non authenticated google account... this means that it is public.....
https://lh5.googleusercontent.com/SuA7NGIYC7uVg7XsIYnYSHEIDnTkLfa04Hm9dPSz8tbZZULdrxVMMIcB6MWTIXHGb0FKTQ=s220
这是您用来托管图像的方法.
And this is the way you can use it for hosting images.
这篇关于如何将Google云端硬盘用作CDN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!