We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
Google 的文档查看器无法做到这一点,因为它需要将文件的 URL 作为参数显示(这使得无需登录即可检索 URL 并下载文档),如果无论如何都想使用它,您将必须创建文档的预览版本。
编辑:
您可以将 Google 文档查看器的
url
参数更改为您服务器上的脚本,该脚本应仅接受来自 Google 文档查看器的文档请求(可通过用户代理Mozilla/5.0 (Windows NT 6.1;WOW64;rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe)(通过docs.google.com/viewer)
它很轻,我知道)并根据id
参数或其他参数提供适当的文件。这样您就可以控制谁可以访问文档。这是我的2分钱。It's not possible with Google's doc viewer since it needs the URL of the file to be displayed as a parameter (which makes it possible to retrieve the URL and download the documents without being logged in), if want to use it anyway, you'll have to create a preview version of your documents.
Edit :
You can change the
url
parameter of Google's doc viewer to a script on your server, this script should only accept requests to documents from Google's doc viewer ( identifiable with the user agentMozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) (via docs.google.com/viewer)
it's light, I know ) and serve the appropriate file depending on anid
parameter or something. This way you can control who gets access to the documents. That's my 2 cents.