Launch file:// from Firefox or Chrome

2020-06-03 05:02发布

I am looking for a way to launch a file located on our local file network for use via our local intranet using Firefox or Chrome.

The link works well in IE:

<a href="\\Start\Of\My\Network\file.xlsx">View Report</a>&nbsp;

but in Firefox it shows:

<a href="http://mydomain.com/\\Start\Of\My\Network\file.xlsx">View Report</a>&nbsp;

is there a way to get the link to render properly?...Just a simple click from a href tag.

5条回答
手持菜刀,她持情操
2楼-- · 2020-06-03 05:06

There is the LocalLink add-on for firefox. It uses a context menu though...

查看更多
叛逆
3楼-- · 2020-06-03 05:12

This is not enabled in firefox for security reasons (remember that most computers have files and applications of a sensitive nature located in similar locations, like C:\System\Windows)

you can try adding this to the user.js file for any user that needs to be able to access these links:

user_pref("capability.policy.policynames", "localfilelinks");
user_pref("capability.policy.localfilelinks.sites", "file:///[[PUT SERVER NAME HERE]]";);
user_pref("capability.policy.localfilelinks.checkloaduri.enabled",  "allAccess");

Just remember that this is a security risk.

查看更多
戒情不戒烟
4楼-- · 2020-06-03 05:16

Use IE tab (available for Chrome and Firefox) and set that to handle all links of the form file:/// by adding an autourls entry like this:

r/file:///.*

Technically this isn't opening the file in the original browser, but it gives you all the windows explorer integration you'd expect from whatever IE version you've got installed when dealing with local file links. I would advise against doing this except in cases when the browser isn't being used to access the web - e.g. for viewing internal wiki or intranet pages, due to the obvious security risk.

查看更多
贪生不怕死
5楼-- · 2020-06-03 05:21

Firefox seems to want file://///Start/Of/My/Network/file.xlsx

Chrome and IE handles that too. file://Start/Of/My/Network/file.xlsx appears to work in Chrome as well, sometimes firefox hics up on it..

查看更多
Luminary・发光体
6楼-- · 2020-06-03 05:24

For Chrome, a new extension was just posted today! It's called LocalLinks and it replicates the functionality of the locallink add-on for Firefox! You'll find it on the Google Extensions page, or you can get to it directly here:

https://chrome.google.com/extensions/detail/jllpkdkcdjndhggodimiphkghogcpida

Enjoy!

查看更多
登录 后发表回答