Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

7 Answers

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

share|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
add comment

How about the LocalLinks extension for file:// links?

Allows opening file:// links on pages loaded by http(s):// scheme

The security model of Chrome prevents/blocks the user from being able to open file:// links when the user selects (left clicks) the link, or selects to open them in a new window (middle click). Loading this extension will allow you follow file:// links when you explicitly select them (left click/middle click). The HTML elements it will follow are ones like <a href="file://server/share/file.txt"> or <a href="file://c:/localdiskfile.txt">.

NOTE: It can't load images (like <img src="file://..." />)!

To open a link in the same tab, use the left mouse button.

To open a link in a new background tab, use the middle mouse button.

This extension is modeled after the LocalLink add-on for Firefox.

Read http://blog.chromium.org/2008/12/security-in-depth-local-web-pages.html

share|improve this answer
    
Generally you shouldn't provide link only answers. For more info on answering, see How to Answer. –  Prof Pickle Apr 8 '13 at 9:19
add comment

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.

share|improve this answer
add comment

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.

share|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
add comment

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.

share|improve this answer
add comment
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

share|improve this answer
add comment

OK, found a workaround for Chrome.

Go to this link in Chrome. Now when you right click you can open any document.

My link looks like this

file://SERVER/file
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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