views:

2222

answers:

5

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?

Thanks

A: 

That's odd. My version of Google Chrome works fine with file: URLs.

file:///C:/Documents%20and%20Settings/chipuni/My%20Documents/Websites/index.html

is open in another tab right now.

Try using a capital letter for the drive name.

Chip Uni
A: 

You can press CTRL-O to open local files in Google Chrome on Windows.

However, some file types will just get "downloaded" depending on their associations.

You might try opening the file via the above method to first see how it reacts and second to see what the in the address bar.

RAD Moose
+4  A: 

You can't link to file:/// from an HTML document that is not itself a file:/// for security reasons.

Andreas Bonini
A: 

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 webpage from a remote host can access files on your local host using the file:// link syntax. This is considered a security flaw in IE (and its 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.

Rory
+5  A: 

If you want to be able to open file:// links from and http:// or https:// scope, it won't work in Chrome because of their security model... until now! There's now a LocalLinks extension on the Chrome extensions page that will allow you to do it! It's modeled after the LocalLink add-on for FireFox. Enjoy!

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

Jim Hendry