We have an internal wiki setup and do a lot of linking to files on internal shares.

We typically use this format (where Share is the name of the server):

<a href="file:///\\share\blah\blah\file.txt">

This works in FireFox (after modifying the userpref.js) and IE.

We've now had a bit of an adoption of Google Chrome. These links do not appear to work in Chrome. I've been unable to find anything about it on the net so far. :/

This is served up on an IIS box (7.0, https). It seems to be that Chrome has some protection like FireFox does and prevents file links from being loaded from a webpage. Does anyone know of any workarounds?

link|improve this question
feedback

6 Answers

I just downloaded the latest chrome beta and <a href="file:///\\share\blah\blah\file.txt"> works.

link|improve this answer
I just tried the latest version, 3.0.195.38 and it is not working. Added a comment to the question that this is being served from an intranet page (https). If save the page to a local file, that works, but it doesn't from the intranet. – Daemonic Dec 15 '09 at 14:04
You need to have server in there: file:///\\server\share\file.txt – sirlancelot Dec 15 '09 at 17:18
In our case, share is the name of the server. I've clarified that in the question. – Daemonic Dec 16 '09 at 19:44
feedback

Ok found a workaround for chrome.

Go to this link in chrome:

http://rightlink.googlecode.com/files/rightlink-1.1.crx

Now when you right click you can open any document.

My link looks like this:

file://SERVER/file

link|improve this answer
feedback

Try this format:

<a href="file://server/share/blah/blah/file.txt">

This worked for me with the latest Google Chrome Beta in a quick test.

A much simpler solution that would work with any browser/program would be to simply map the share to a drive, and then access it through that.

link|improve this answer
1  
But that one doesn't work in Firefox. I'm hoping to find something that works across all browsers (or at least all actively used browsers in the company). – Daemonic Dec 11 '09 at 21:01
@Daemonic, maybe consider PHP parsing the user agent strings? Use simple if/else logic along with get_browser php.net/manual/en/function.get-browser.php This way you can display a different link depending on the browser of the visitor to ensure compatibility. – John T Dec 11 '09 at 21:46
Mapping a drive would work across all browsers – davr Dec 11 '09 at 23:24
Mapping would work, but having everyone have a mapped drive. Also should note that I couldn't get that link to work from inside the wiki (https served data). – Daemonic Dec 15 '09 at 14:06
feedback

I found a work around. Introducing RightLink: http://www.chromeextensions.org/other/rightlink/

Right click the UNC path to open. You may need to enable the option to open local files (as opposed to paths) in the extension's options.

It works on my intranet.

link|improve this answer
feedback

RightLink works, but is a bad workaround for me because it disables the right-click context menu, which I use all the time.

IETab on the other hand works great. I added several internal sites to its Auto-URL config (e.g. http://somesite/*) and they automatically open in an embedded IE tab. IE (or an IE tab) handles file:// links as expected according to the machine's trust configuration.

link|improve this answer
feedback
up vote 0 down vote accepted

We've found a better solution using the Chrome Extension Local Links: https://chrome.google.com/webstore/detail/jllpkdkcdjndhggodimiphkghogcpida

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.