Tags:
create new tag
view all tags

Question

Can I use a UNC name to identify a file on a remote server in an external reference?

In HTML, I can use something like file://///ServerName/ShareName/DirectoryName/FileName.txt.

I've been trying to use that reference within the double-square brackets, but the link it creates does not work. I can get the link to work if I map a drive letter and use it instead of the UNC reference, but everyone does not have the same drive letter mapping so it won't work for all users.

Environment

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- SteveBlair - 25 Mar 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

The short answer is "no". The long answer is "maybe". You don't say what you mean by an "external reference", but TWiki pages are simply HTML, so if you just want a link you might want to try this experiment. In a topic, enter the following:

<a href="file://///ServerName/ShareName/DirectoryName/FileName.txt">Click here</file>
You will not be able to %INCLUDE such a resource, however. the file: protocol is not supported by TWiki.

-- CrawfordCurrie - 28 Mar 2006


Hi Crawford,

Thanks for taking the time to respond. I need to create links to various types of files that reside on a corporate intranet.

I've tried using the square bracket twiki syntax. I've also tried using HTML anchor tags. I cannot create a link to any external file using either a UNC name or a mapped network drive.

Do you have any other suggestions? The documentation for external links on the following page says that file:// references are supported:

http://twiki.org/cgi-bin/view/TWiki04/TextFormattingRules#External_Links

Have I found a bug in file:// support, am I doing something wrong, or are file:// references just completely unsupported?

Best, Steve

-- SteveBlair - 01 Apr 2006

Hm, doesn't SlashFilenamePlugin support this kind of links?

-- FranzJosefSilli - 02 Apr 2006


I've experimented with this plugin and pondered the documentation, wondering the same thing. The way I read it, SlashFilenamePlugin does not enable the functionality--it extends the basic Twiki functionality to display any filename in the wiki text as a link, without having to use the TWiki square brackets or the HTML anchor tag.

I haven't been able to get the basic square bracket or HTML syntax to work, and I can't get SlashFilenamePlugin to work either. Which is why I'm wondering if I've run into a bug, or if I'm making a very basic fundamental mistake of some kind.

-- SteveBlair - 03 Apr 2006

Hm, seems you've discovered some kind of 'bug', better report this on Bugs:WebHome. I remember that I have been able to click on file: links on a Cairo installation, although this doesn't seem to work here on twiki.org. Maybe this is due to some setting because of security considerations.

-- FranzJosefSilli - 03 Apr 2006

Well, maybe it's a Browser problem, read the last comment on DiskPathsAsLinks. (I knew I've read about this before somewhere, one just needs to use proper search queries on twiki.org to find pearls of wisdom, it isn't enough to simply say: hey I can't find what I'm looking for, let's create another Web)

-- FranzJosefSilli - 03 Apr 2006

Has this problem been fixed or does anyone know of a workaround? I need to link to external docs on a server and I am failing miserably.

-- NicolaMoriarty - 13 Jun 2007

In my company something like file://///ServerName/ShareName/DirectoryName/FileName.txt works, but only with Internet Explorer (IE7).

Firefox will not do it because auf security issues:

For security reasons, Mozilla does not allow web content to link to local files. 
An error like:Security Error: Content at url may not load or link to file:///something will appear in the javascript console. 
If you need to follow links to local paths it is recommended that you drag the link to the location bar and then drop it on the webpage. 
If you really don't like the security check and are willing to risk all files on your system and that your system can access then you may 
add the following line to user.js in your personal profile directory. user_pref("security.checkloaduri", false); (Bug 84128)

But there is a workaround : You will need to install the extension IE Tab. With this extension installed in Firefox you can open a new Firefox tab which will show the file with IE instead of Firefox.

-- GerritEntelmann - 06 Aug 2007

The last statement isn't entirely true and the security.checkloaduri setting only works in Firefox 1.0 and older. Firefox 1.5 and newer allows to change this behaviour on a per-site basis as described here in the Support web or on Mozillazine.

Having said that, generating working links to local files (UNC) is still a major hassle on TWiki especially when working with links containing spaces or umlauts. SlashFilenamePlugin doesn't help in most of these cases either.

-- MartinKaufmann - 29 Aug 2007

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2007-08-29 - MartinKaufmann
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.