views:

72

answers:

4

It is not uncommon for our intranet web applications to link to publications, documents, or other resources from our shared network file servers.

In the past, we've had little trouble fashioning links such as the following:

file://fileserver1/folderofgoodies/rules.pdf
\\fileserver1\folderofgoodies\rules.pdf

The reason we had no trouble is because everyone in the building uses IE6 or IE7 (very few have IE8). Both styles of URLs worked fine in Microsoft browsers it seems.

But if you try clicking such links in other browsers, specifically Firefox, nothing happens!

On a new intranet web app I'm developing I've been attempting to ensure cross-browser support, but any links to local computer or local network resources seem to be ignored in at least Firefox 3.5.3, though I admit I haven't yet checked other browsers.

Is there any way I can change the way I link to said files so that browsers like Firefox will accept them? I cannot do anything that requires installing scripts, software, extensions, or any other solution on a per-user/per-computer basis.

I realize the suppression of said links is a security thing, but these links would be originating from only trusted local intranet locations, so...

A: 

I think your only option is reconfiguring Firefox, but unfortunately you said you can't do that.

Matthew Wilson
Indeed, the goal is to have things "just work" and not put the onus on the user to reconfigure settings or otherwise change their computer/browser (since many of them are not even remotely computer whizzes).
Yadyn
A: 

You could just map the file server path as a virtual directory into your intranet site and link via http.

Eric Petroelje
Could you provide an example? Does this mean messing with IIS or the equivalent? Or is this something I can do at the application level? If it helps, this is an ASP.NET web app.
Yadyn
A: 

Mozilla applications block links to local files. The only way is to install plugin(s) to Firefox. This link describes some of them.

alex
+3  A: 

If this is intranet, you can build a little helper server/page/webservice/whatever to which you will link and pass file name as parameter:

http://server/getlocalfile?path=file://fileserver1/folderofgoodies/rules.pdf

And you will benefit from extended security, by the way.

queen3
Would this initiate a download prompt from most browsers or would this call the default handler? For example, I'd much prefer PDFs open in the in-tab Adobe Reader plugin... or at the very least open in the desktop client Adobe Reader... I suppose it is acceptable if the browser offers the "Open or Save" and they can click Open... hmm.
Yadyn
It will if you tell browser to do so. For example, see http://support.microsoft.com/kb/260519. Basically, you set content type and file name.
queen3
Also see http://stackoverflow.com/questions/81283/asp-net-how-to-detect-file-upload-mime-type if you want specific mime type, so that Adobe plugin recognizes it as PDF.
queen3
Also http://aspalliance.com/259 for a simpler solution, though you really better detect file types, not use few hard-coded ones.
queen3