谷歌驱动器托管 URL 更改 [英] google drive hosting changes in URL

查看:21
本文介绍了谷歌驱动器托管 URL 更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个使用谷歌驱动器作为托管平台的网络应用程序,如下所述:

I've developed a web app that uses google drive as hosting platform as explained here:

https://support.google.com/drive/answer/2881970?hl=zh-CN

当用户访问时,应用程序一直运行正常:

The application has been working OK when users accessed:

https://googledrive.com/host/0B0YWdwxH6KAKfycbx66sZMaqLK8byhV7wY_DoQ8ouqF1acWRcc0JIHyDu5CVWZupAK&id=people

但昨天它开始将该地址重定向到:

But yesterday it started redirecting that address to:

b216bdb4cf56e8d9d85cf1123921ca125a010325.googledrive.com/host/0B0YWdwxH6K5XdVpaNjhWUl9vZkE/

b216bdb4cf56e8d9d85cf1123921ca125a010325.googledrive.com/host/0B0YWdwxH6K5XdVpaNjhWUl9vZkE/

知道为什么吗?这是永久性的变化吗?子域键是否遵循任何逻辑?

any idea why? is this a permanent change? does the subdomain key follow any logic?

浏览器:发生在 chrome &IE操作系统:windows8网络版云端硬盘/桌面版云端硬盘:访问 googledrive.com/host 时

Browser: occurs on chrome & IE Operating System: windows8 Drive on the Web / Drive for desktop: when accessing googledrive.com/host

推荐答案

我在 google.com 上找到了合适的帖子来回答这个问题.这里是:https://productforums.google.com/forum/#!category-topic/drive/mTyJXruRhBg

I found the right thread at google.com to answer this. Here it is: https://productforums.google.com/forum/#!category-topic/drive/mTyJXruRhBg

简而言之,重定向和前缀将继续存在.这是为了一些安全的事情.同一 googledrive 文件夹中的所有文件都将以相同的 guid 字符串作为前缀.也就是说,只要我们使用这个 googledrive url 形式:googledrive.com/host/{folderID}/FriendlyFilename.然后,您想要访问或从该文件夹链接的任何支持文件,只需使用相对 url 形式的 FriendlyFilename 访问它们.

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.

我的问题是,我使用的是不起眼的表单 googledrive.com/host/{userID+fileID}.(没有 FolderID 或 FriendlyFilename).现在,同一文件夹中的每个文件都会获得不同的域前缀.

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.

这是我上面展示的那个测试文件的一个不同的变体(它得到了 webworker 的安全异常).它现在通过使用 {FolderID}/FriendlyFilename 表单工作.多田.https://googledrive.com/host/0B8BLd2qPPV7XME1rNU9iWnYtbTg/ded-worker-F12throw.html

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屋!

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