No categories assigned

FileLink

Revision as of 18:46, 25 February 2019 by RichardHeigl (talk | contribs) (Java Einstellungen)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

FileLink is a tool developed to add a link to a file in the filesystem. The file links must be enabled in the settings of the wiki. In addition, settings in the browser and possibly in the workstations are needed to use FileLinks.

Icon-info.png Info

The real potential is that you can use this mechanism to connect to any system reachable via URL, e.g.

  • intranet articles
  • Lotus Notes addresses
  • Sharepoint documents



Where do I find FileLink File Link?

Btn-WYSIWYG-InsertLink.png The button "File Link" you will find in both editors (WYSIWYG and wikicode).

Please select "link to file":

Screenshot:Dialogue for inserting file links


Insert link

  • Position the cursor where you want the file link to appear
  • Open the InsertLink tool
  • Enter the link target as link path (browse for the file) and an additional description if you want
  • Click on ok
  • In the code you will see the file link as the following: [[link path|description]]

Syntax

Filelinks will be activated with the help of the "file://"-protocol. A link to a file f:\temp\Test.doc looks like this:

file:///f:/temp/Test.doc

Filelinks have to be actived in the wiki to be recognised.

Filelinks are often disabled in browsers because they represent a potential security gap (other executable programs could be linked, too).

Particularities of browsers

Firefox

Links can easily be opened if the Extension LocalFile is installed:https://addons.mozilla.org/de/firefox/addon/locallink/

Note: Filelinks do work if Firefox is started from the programms folder or the Desktop, because all personal configurations are loaded and started. If you are starting Firefox for example out of an E-Mail-Tool (e.b. Lotus Notes) the Filelinks won't work, as your personal configuration is not loaded. There seems to be no remedy, maybe the popupblocker is a bproblem here.


The names need to be in one line, divided by whatespaces if there are more policies defined:

user_pref("capability.policy.policynames", "localfilelinks OTHERPOLICY");

more Info

Google Chrome

Links can be opened easily when the Extension LocalFile is installed:
https://chrome.google.com/webstore/detail/locallinks/jllpkdkcdjndhggodimiphkghogcpida/'

Internet Explorer

  • Testing if the Filelink is valid:

Copy the Link to the file via your context menu and insert it in the address bar of your browser. If the file opens the Filelink is ok.

  • If you are working with UNC paths the links have a higher propapility of working (file://127.0.0.1/TEMP/debug.txt). The corresponding folders need to be accessible, the access happens by using the share name. Warning: Whitespaces need to be replaced with %20.

Older versions of the IE open Filelinks more easy. Since IE6 (SP2) those links won't open, adding the pages to the list of trusted sites won't help either. Solution: Change the following entry in the Windows Registry from 3 (default) to 0: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\0\2101. Relog afterwards.

  • If there are two slashes given with the protocol, Links with whitepsaces (%20) are encoded wrong, IE changes it to %2520. So remember to always work with file:///.

Java Settings

To load the "Insert file" dialog Java is needed.

java block.png
If a window is showing up saying, that the applet was blocked due to security reasons, please proceed as following. If you have Java Version 1.7.0_51 or bigger you can add your wiki to the Exception Site List.
PasteImage 1.png
Open your system settings and click on "Java"
PasteImage 2.png
Click the "Security" Tab and "Edit Site List..."
PasteImage 3.png
In the upcoming window, click "Add" to add your website to the trusted pages
PasteImage 4.png
After entering your address, click ok
PasteImage 5.png
Java wants you to accept the entry you've made. Re-check your URL and click "Continue".
PasteImage 6.png
Now you should see your URL in the Exception Site List. Click ok to save it.



If you have Java Version 1.7.0_40 or 1.7.0_45 you need to import the certificate the applet uses.

PasteImage 1.png
Open your system settings and click on "Java"
PasteImage cert 1.png
Open your system settings and click on "Java"
PasteImage cert 2.png
In the upcoming window, choose "Signer CA" as Certificate type. Afterwards click "Import"
insert link cert.png
Choose the pasteImage.crt file. If you can't see the file, choose "All Files" from the "Files of type" dropdown
PasteImage cert 4.png
Verify, that you have imported the right certificate. You can see the HalloWelt! - Medienwerkstatt GmbH as the issuer.

Note: After those steps it is important to restart your browser completely!


PC Settings

Systemeinstellungen-Internetoptionen.png

Windows Control Panel-> Internet Options

RegisterSicherheit.png

In the Internet Options window, select the "Security" tab

LokalesIntranet.png

„Local Intranet“ > „Sites“

Erweitert.png

"Advanced"

Websitehinzufuegen.png

Add your Website

„close“-> „OK“

VertrauenswSeiten.png

„Trusted Sites“ -> „Sites“


HTTPSentfernen.png

Add your Website and remove the hook in the checkbox

"close" (OK)


Attention!!

In general it is prohibited for all browsers to open files from a system.

The expose data from the file system to a website's code. - A typical error message could be something like: "/ fakepath / file C".

In In order to read out file paths (and put a link into the article) it needs a Java Applet, which is allowed to read out and return the path to the website.

In the future, browsers will no longer support these applets (Chrome already doesn't). => Unfortunately this is a development that we can not influence.

But that does not mean that "InsertLink" no longer works, or that links to files aren't possible.
They probably need to be entered manually or be set by copy and paste of the corresponding path.
Regarding the opening of file protocol links: Only Internet Explorer supports opening a directory in the Windows Explorer (file system browser), because Microsoft grants the own browser a better support. All other browsers have to display these in their own window.
Furthermore, it's not allowed to open files and directories by default. Outside the intranet, this would expose a major security issue. (For example: a .exe which installs malware in the background) Therefore it's necessary to activate this function for a particular URL (in this case the wiki's address) in every browser.

For an helpful article about this topic, please visit:

Browser particularities
Because of the further development of the various browsers, it's possible, that plugins doesn't work anymore or need to be updated. Also it might be necessary to change the browser settings.

For example, here is a plugin for Mozialla Firefox: http://addons.mozilla.org/en-US/firefox/addon/locallink/

Ressourcen

  • Keywords: local file, file link, filelink, dateilink, link auf datei, file URI, file protocol

Attachments

Discussions