开发者

Open a file that is on a file server from a webpage?

开发者 https://www.devze.com 2023-02-23 19:58 出处:网络
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

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 wor开发者_如何学Cd 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.


3 options. Remember this is for an internal website.

  1. 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.

  2. 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.

  3. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消