[Home]NetworkFile

UseModWiki | RecentChanges | Preferences

$NetworkFile = 1;       # 1 = allow remote file:, 0 = no file:// links
From wili.pl
  if ($NetworkFile && $name =~ m|^file:|) {
    # Only do remote file:// links. No file:///c|/windows.
    if ($name =~ m|^file://[^/]|) {
      return ("<a href=\"$name\">$name</a>", $punct);
    }
    return $rawname;
  }
See the results of Why did I post this - I can't get it to work.

try this: [My C Dir]


2006-07-21,SvennBjerkem: My experience on the topic of accessing network drives from pages in the wiki is that Mozilla Firefox and Internet Explorer handle file: links a bit differently: Firefox consider access to the local filesystem through such links as a security risk, and the user has to turn it on. Luckily, for Firefox versions > 1.5, this can be done on a per server base in the user.js file:
 user_pref("capability.policy.policynames", "localfilelinks");
 user_pref("capability.policy.localfilelinks.sites", "http://thishost.thisdomain.ext");
 user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");

With this modification to the security policy in Firefox, it is now possible to access files on a network drive by the URL

 file://///machine/volume/dir/file.ext
Internet Explorer is happy with less slashes, but Firefox must have five, and Internet Explorer is happy with that also. It is also possible to copy and paste from the file explorer:
 file://\\\machine\volume\dir\file.ext
works for both Firefox and Internet Explorer. Firefox has a nice directory browse function if the link points to a directory, IE pops up the Windows Explorer.

Problem as I can see with standard Usemod is that I cannot get file://///myhost/myvol to work because it is not recognized by vanilla Usemod. I have patched my own version to make it work (change the regexp for file URL) but it should also be considered for a future revision of Usemod. As you can see from the above file://\\\ link this seems to be a workaround to access local network drives with current versions of Usemod. (It's not a bug! It's a feature!!!!!) It will only work if you add usemod.com to the capability.policy.localfilelinks.sites in user.js. (delimited by space, and containing http://)


See also
URLStyleLinks
WikiPatches/MonoSlashedFileLinks


UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited July 23, 2006 8:20 pm by MarkusLude (diff)
Search: