从网页打开文件服务器上的文件?
我正在开发一个内部应用程序。我们有一个网站,显示一组工作的所有 SSRS 报告。我被要求查看是否可以链接该工作组的所有文件(pdf、word、excel)。这些文件存储在查看报告的用户有权访问的文件服务器上。每个组都有自己的报告组和共享文件。
是否可以从网页打开文件(无需下载)?这意味着它们的文件是从文件服务器打开的?我不希望人们下载该文件的副本。
我很确定这可以在 IE 上使用,因为 sharepoint 可以做到这一点。但是,其他浏览器可能会出现问题。
编辑:我想要的是有一个包含文件链接的网页。当他们单击链接(例如 Word 文档)时,Word 将打开驻留在文件服务器上的文件。无需从网络共享下载本地副本。
EDIT2:请注意,我知道我所问的问题可能在所有浏览器中都是不可能的。我或多或少只是确定一下。在 IE 中使用 activeX 似乎是可能的,但在该浏览器之外,浏览器在将进程保留在沙箱内方面做得很好。
I am working on an internal application. We have a website that displays all our SSRS reports for a group of work. I have been asked to see if I can link all the files (pdf, word, excel) for the group of work. These files are stored on a file server that users viewing the reports have access to. Each group has its own group of reports and shared files.
Is it possible to open the files (without downloading them) from a webpage? Meaning that they file is opened from the file server? I don't want people to download a copy of the file.
I am pretty sure this can work with IE because sharepoint does it. However, other browsers may have an issue.
EDIT: What I would like is to have a web page with links to the files. When they click on a link (say for a word doc), word will open the file that resides on the file server. Without out a local copy downloaded from the network share.
EDIT2: Please note, I know what I am asking is probably not possible in all browsers. I am more or less just making sure. It seems possible in IE using activeX, but out side of that browsers do a good job at keeping processes inside a sandbox.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
3 个选项。请记住,这是一个内部网站。
使用 file:// 链接到共享。这会对下载要查看的文件产生副作用。只要用户每次点击打开就没什么大不了的。
使用JavaScript和activeX打开word(excel、reader等),并将文件路径作为命令行参数传递。这仅适用于 IE,在 win7(可能是 vista)中,用户将弹出一个窗口,询问 activeX 控件是否可以运行。
创建一个新协议。打开文件://.这将被设置为运行安装在客户端计算机上的应用程序来打开该文件。由于它是内部的,因此该应用程序可以毫无问题地安装在计算机上。这也需要更改注册表。
我没有选择一个,因为这一更改仍在研究中,但我想我会更新它,以防有人遇到类似的情况。
3 options. Remember this is for an internal website.
link to the share using file://. This will have the side affect of downloading the file to be viewed. As long as user clicks open every time it should not be a big deal.
Use JavaScript and activeX to open word (excel, reader, ect) passing in the file path as a command line arguments. This works only in IE and in win7 (probably vista) user will get a pop up asking if it is ok for the activeX control to run.
Create a new protocol. openfile://. This would be set up to run an application that is installed on the client machine which would open the file. Since it is internal, the application could be installed on the machines without issues. This also requires a registry change.
I haven't picked one as this change is still being looked into but i figure I would update this in case someone runs into something similar.