谷歌驱动器托管URL的变化 [英] google drive hosting changes in URL
问题描述
我开发了一个使用谷歌驱动器作为托管平台的网络应用程序,如此处所述:
https://support.google.com/drive/answer/2881970?hl=zh_CN
当用户访问时,应用程序一直正常工作: $ b
但昨天它开始将该地址重定向到:
b216bdb4cf56e8d9d85cf1123921ca125a010325.googledrive.com/host/0B0YWdwxH6K5XdVpaNjhWUl9vZkE /
任何想法为什么?这是一个永久的变化吗?子域密钥是否遵循任何逻辑?
浏览器:发生在chrome& IE
操作系统:windows8
访问googledrive.com/host时在Web / Drive上启动桌面:访问googledrive.com/host
我在google.com上找到了正确的线索来回答这个问题。这里是: https://productforums.google.com/forum/# !category-topic / drive / mTyJXruRhBg
总之,重定向和前缀在这里停留。这是为了一些安全的事情。同一个googledrive文件夹中的所有文件都将以前缀相同的GUID字符串作为前缀。也就是说,只要我们使用这个googledrive url表单:googledrive.com/host/{folderID}/FriendlyFilename。然后,你想要访问的任何支持文件或从该文件夹链接,只需以相对URL形式作为FriendlyFilename访问它们。
我的问题是,我使用的是模糊的表单googledrive.com/host/{userID+fileID}。 (没有FolderID或FriendlyFilename)。现在为同一个文件夹中的每个文件都获得了不同的域前缀。
这是我上面显示的测试文件的一个不同变体(获得webworker的安全性例外) 。它现在通过使用{FolderID} / FriendlyFilename表单工作。田田。 https://googledrive.com/host/0B8BLd2qPPV7XME1rNU9iWnYtbTg/ded-worker-F12throw.html
I've developed a web app that uses google drive as hosting platform as explained here:
https://support.google.com/drive/answer/2881970?hl=en
The application has been working OK when users accessed:
But yesterday it started redirecting that address to:
b216bdb4cf56e8d9d85cf1123921ca125a010325.googledrive.com/host/0B0YWdwxH6K5XdVpaNjhWUl9vZkE/
any idea why? is this a permanent change? does the subdomain key follow any logic?
Browser: occurs on chrome & IE Operating System: windows8 Drive on the Web / Drive for desktop: when accessing googledrive.com/host
I found the right thread at google.com to answer this. Here it is: https://productforums.google.com/forum/#!category-topic/drive/mTyJXruRhBg
In short, the redirect and prefix is here to stay. It's for some security thing. All files within the same googledrive folder will be prefixed with the same guid-looking string. That is, provided we use this googledrive url form: googledrive.com/host/{folderID}/FriendlyFilename. Then, any support files you want to access or link from that folder, just access them as FriendlyFilename with relative url form.
My problem was, I was using the obscure form googledrive.com/host/{userID+fileID}. (no FolderID or FriendlyFilename). That now gets a different domain prefix for every file within the same folder.
Here's a different variation of that test file I showed above (which was getting Security exception for webworker). It works now by using the {FolderID}/FriendlyFilename form. Tada. https://googledrive.com/host/0B8BLd2qPPV7XME1rNU9iWnYtbTg/ded-worker-F12throw.html
这篇关于谷歌驱动器托管URL的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!