KRayWiki:FileURLs

From KRayWiki
Jump to navigation Jump to search
See Also 
About CSDI Wiki
CSDI MediaWiki Gotchas


Introduction

Though a wiki is a natural medium for linking local intranet file resources, most modern web browsers do not support clicking file:// links to open local, intranet resources. If a browser allows this, the wiki can help users:

  • Open files in a suitable tool.
  • Open directories in Microsoft Windows Explorer.

To facilitate use of such links, this page covers a variety of related topics.


NOTE 
file:// links formatted per instructions on this page are often useful even if a browser refuses to open the links directly. It has been found that both Microsoft Internet Explorer 8 and Mozilla FireFox 41 allow a user to right-click and Copy file:// links. Copied links may then be opened by pasting the URL into Microsoft Windows Explorer.

Browsers

Internet Explorer

A Microsoft Internet Explorer page may provide information specific to that browser family.

  • Microsoft Internet Explorer 8 details how to enable click-to-open local, intranet file links in that browser. Information there may or may not pertain to other versions of Internet Explorer.

FireFox

A Mozilla FireFox page may provide information specific to that browser family.

Chrome

A Google Chrome page may provide information specific to that browser family.

File Links

Wiki Templates

Link-rot, or wiki link breakage that occurs as linked resources change over time, can be mitigated through the use of wiki [[[:Template:MediaWikiURL]]?title=Special%3APrefixIndex&prefix=&namespace=10 templates]. When linking a number of resources that share the same root URL, strongly consider assigning the common root to a wiki template, and then use it to construct the various sub-links. If this is done, and as long as the sub-link remains the same, when a resource moves in the future, all links that use the template are trivially updated en masse by a single edit of the wiki template.

DFS References

Templates, or links, constructed with a DFS (Distributed File System) reference provide another layer of resilience to infrastructure changes. DFS links are logical references to file system resources that are not dependent on server host and domain names. When a user references a DFS link, the link remains valid even if a system administrator changes the underlying server infrastructure (presuming that the DFS system is responsibly updated).

Use of DFS references like //FileServer/DFS_Root/Share_Name/ are strongly suggested when DFS is available. If the server infrastructure changes, the DFS links are designed to remain valid as they indirectly link the actual resource. Use of DFS links can protect the wiki against a need for edits as resource locations change for a variety of reasons not necessarily known to wiki editors.

It is not always possible to use DFS references as file stores may not always be assigned logical names, but for such links, wiki [[Template:MediaWikiURL/index.php?title=Special%3AAllPages&from=&to=&namespace=10 templates] are still a viable way to mitigate wiki maintenance cost due to link-rot.

A DFS (Distributed File System) UNC requires that the domain precede a DFS reference 
By way of example, consider the following example URL:
[file://////FileServer/DFS_Root/Share_Name/Path/To/File.xls File.xls]

Use of Domains in a URL

All URLs below reference the same file to illustrate correct use of domains:

A UNC requires the domain to either be omitted or appended to a UNC 
[file://////Hostname/Path/To/File.xls File.xls]
-or-
[file://////Hostname.DNSDomain/Path/To/File.xls File.xls]
  • Note the forward slash count at the beginning of the URL host names. The number is critical, and assures optimal usability of the link.
  • Browsers may support direct or indirect opening of such links.
Note that enclosing a URL in wiki square bracket markup results in a need for extra forward slashes at the beginning of the link. If a link is not enclosed, it is acceptable to drop one of the pairs of slash characters
file:////Hostname.DNSDomain/Path/To/File.xls
Clicked UNC links do not open by default in most browsers. 
A possible workaround is to right-click the link, then paste it directly into the address bar of either the browser or a file manager like Microsoft Windows Explorer.

Use of Drive Letter in a URL

While drive letters may be used in a URL, their use is strongly discouraged. 
While an organization may standardize certain drive letters, they only apply to Windows systems.
They represent an unsafe assumption that all Windows systems have these drives mapped.
[file:///////X:/Directory Descriptive X: Name]
-or-
file:///X:/Directory
  • Note the forward slash count at the beginning of the URL drive letter.
  • The drive letter may be either upper or lower case.
Clicked links that use drive letters do not open by default in most browsers. 
See the Browsers section for corrective measures and workarounds related to this issue.