I am linking on an intranet page to a local file on a shared drive:
<a href="file:///s:/test.xls"> Test</a>
This works in IE and Firefox with an addon called local link.
How can I get this to open in Google Chrome?
I am linking on an intranet page to a local file on a shared drive:
<a href="file:///s:/test.xls"> Test</a>
This works in IE and Firefox with an addon called local link.
How can I get this to open in Google Chrome?
You can't link to file:/// from an HTML document that is not itself a file:/// for security reasons.
From what I've seen of this the following is true for Firefox and Chrome;
1) If you have a HTML page open from a remote host then file:// links will not work i.e. Your address bar reads http://someserver.domain and the page contains a link such as <a href="file:///S:/sharedfile.txt">
2) If you have a HTML page open from your local host then file:// links will work i.e. your address bar reads file:///C:/mydir/index.html and the page contains a link such as <a href="file:///S:/sharedfile.txt">
For Internet Explorer point 1) does not hold true. A file on your local host can be accessed using the file:// link syntax from a webpage on a remote host. This is considered a security flaw in IE(By who? References?) (and it's there in IE8 too) because a remote host can access files on your local computer without your knowledge .... admittedly they have to get lucky with the filename but there are plenty of commonly named files there with the potential to contain personal/private information.
Hopefully this helps others in an enterprise setting looking for a solution. My solution after much tinkering was the following:
Follow the steps in the following link to install legacy browser extension and gpo settings: https://support.google.com/chrome/a/answer/3019558?hl=en&ref_topic=3062034
Enabled legacy browser redirect for "file://" through chrome gpo configuration Google Chrome -> Legacy Browser Support -> "Websites to open in alternative browser"
Configure gpo to also install extension: https://chrome.google.com/webstore/detail/enable-local-file-links/nikfmfgobenbhmocjaaboihbeocackld that redirects file:// links to bypass chrome file:// link block.
The extension opens the links which then triggers google chrome to open the link in internet explorer. The result is IE opens a window, then opens the file/folder for the user, then IE closes itself.