Open and save documents on local intranet site from shared folder
I have an intranet site where we host files and forms.
When someone clicks on a link to a file on Internet Explorer it opens the file from a shared folder on the server so people who have permission can edit it and save changes. Other people have read only permissions.
If a person clicks on the link in a browser other than Internet Explorer it downloads the file instead of opening it from the shared folder.
Is there a way to have other browsers open the file from the shared folder instead of downloading it?
NOTE: I should clarify that in IE I use the file://
protocol and in other browsers I use http://
because file://
does not work.
For read only mode it depends on the browser ie Firefox needs some parameters for file uri processing
user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "http://yourServer1.companyname.com http://yourServer2.companyname.com");
user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
then it should invite you to download or open the document
For read/write access IE is mandatory
I think that has something to do with the content type of the files. Have a look at that answer https://stackoverflow.com/a/11894771/2153744
For Firefox and Chrome there are extensions to override that behavior (LocaLink for Firefox, Locallinks for Chrome). If you control your intranet software installations you could include those potentially unsafe extensions.
But this is not other browsers; just Firefox and Chrome. So, another option (that I've seen being used) is using a signed Java Applet. The downside is the complexity and having the user authorize the applet which needs privileged execution. The upside is that the applet can do anything as it is a privileged local client.
链接地址: http://www.djcxy.com/p/84578.html上一篇: 在不创建新实例的情况下访问构造函数的属性