[Moin-user] Re: How to embed links to files, rather than the files themselves?

Bradey Honsinger BradeyH at construx.com
Wed Oct 20 14:20:18 EDT 2004


Matthew Wilson wrote:
> On Wed Oct 20 12:23:50 2004, Michael P. Soulier wrote:
> > On 20/10/04 Matthew Wilson did say:
> >
> >> Followup: I discovered that 
> >> 
> >>     [file://metrix/hds1/123files/hds/TAPELOG.XLS tapelog]
> >> 
> >> works fine in IE, but not in firefox.  I suspect that this is some
kind
> >> of mime type issue.
> >
> > Most likely, //metrix is a windows share, which is why it works in
IE.
> > Firefox, rightly so, ignores such non-standard nonsense. 
> 
> Metrix is a Red Hat linux server, using NFS (I think).

As Michael said, it's probably an SMB (Samba) file share.

> > Make it available on a web server, and link to it that way. 
> 
> No can do.  Is there any way to link to a file on a file server?

Yes, with some qualifications--if all of your clients are running
Windows and have access to the file server, it will work fine. This 
is really a Mozilla issue, not a Moin one, but it's particularly
relevant to wikis on an intranet, so here goes.

I've run into the same issue here with our internal wiki.  We
want to provide links to files on internal fileservers; Michael's
concerns about file:// URLs are valid in general, but for an internal
wiki where everyone does have access to the fileserver, it's not an
issue. In order to get it to work, you need to do two things.

The first has to do with the URL itself--Mozilla (and, I assume,
Firefox) requires URLs to non-local files to be in the form:

  file://///<host>/<share>/<path>

For example, if you have a fileserver named "Development" with a
share named "Projects" and a directory named "AirTrafficControl", the
Mozilla URL would be:

  file://///Development/Projects/AirTrafficControl/

Also, remember that the URL has to be properly encoded--if the
directory name was "Air Traffic Control", the URL would be:

  file://///Development/Projects/Air%20Traffic%20Control/

The five forward slashes are ugly but necessary; it won't work any
other way. They do work with IE, so you don't sacrifice cross-browser
compatibility.

Second, you need to change Mozilla's security settings. By default,
Mozilla does not allow file:// URLs to be loaded from http:// URLs
(see bug #84128 at bugzilla.mozilla.org). To change this, go to
about:config in your browser and change security.checkloaduri to
false.

That should do it.

  - Bradey




More information about the Moin-user mailing list