HTML links to local network shares [duplicate]
Asked Answered
H

3

19

Why do these links not work? If I click on them in FF or Chrome, nothing happens - it doesn't even try to open them!

<a href="file://someshare/dir/subdir/file.txt">Linky</a>
<a href="file:////someshare/dir/subdir/file.txt"> Linky</a>
<a href="file://\\someshare\dir\subdir\file.txt">Linky</a>

Any ideas?

Hammel answered 23/9, 2009 at 9:46 Comment(2)
file:// protocol doesn't seem to work on FFAnatomy
@Mauris: the file protocol works just fine on FF, just not for links from pages served over HTTP.Everyman
A
17

In general, this is disabled because it is a security risk. See also this question: Cross-browser link to file on local system, and the link provided by sleske to here.

Auliffe answered 23/9, 2009 at 9:49 Comment(1)
The link provided by sleske is gone. @Sean O has an answer belowGnarled
H
4

This is an oldie, but goodie -- still comes up quite often.

There are extensions for both browsers (FireFox & Chrome) that can allow you to access local links:

Chrome - Locallink

Firefox - LocalLink

Hanfurd answered 23/5, 2011 at 13:19 Comment(3)
This works. :) is there any other way that I can convert the NFS path to a HTTP link??Thoria
Both links are broken.Mitman
That's ironic. :)Lainelainey
E
0

Peter's got the answer, but FYI you should find something like the following in FF's Error Console (available from the Tools menu):

Security Error: Content at http://localhost/temp/a.html may not load or link to file:///C:/Documents%20and%20Settings/zzzzzzzz/My%20Documents/www/temp/box.html.

Everyman answered 23/9, 2009 at 16:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.