File Links Opener

Description

File Links Opener is an extension for web browsers that allows you to open links to local files and folders (file:///) in the system file manager or associated application.

The main purpose of this extension is to provide transparent access to files and folders located on local or network drives from a web page opened in a browser.

Usage examples:

Features

The ability to specify the addresses of the sites to which the extension will be applied.

The ability to specify which files (by extension) will be opened in the system file manager or associated application, and which ones the web browser will try to open on its own.

The ability to centrally configure all instances of the extension. This allows, for example, the system administrator to set extension parameters for all users through a single external configuration file.

Internationalization. Full support for the following languages: English, Russian. The list may be expanded in future versions.

Open source code.

Notes

For the extension to work, you must additionally install an intermediate application that allows the extension to interact with native applications of the operating system.

Currently, the following web browsers are supported: Google Chrome, Microsoft Edge, Mozilla Firefox, Yandex Browser. The list may be expanded in future versions.

The following operating systems are currently supported: Microsoft Windows (7 and above). The list may be expanded in future versions.

Full documentation on installation, configuration and use is available at the link https://dmitryunruh.github.io/file-links-opener/index.html

Installing

Step 1

Install the File Links Opener extension from the web browser extension store:

Extension web store
Google Chrome
Microsoft Edge
Mozilla Firefox
Yandex Browser *

* Yandex Browser does not have its own extension store. The Google Chrome extension web store is used.

Step 2

Allow the extension to open file links (not required for Firefox):

Step 3

Install an intermediate application (native messaging host) that allows the Extension to interact with native applications.

Select, download and install the intermediate application using the link from the table below, depending on the operating system and the availability of the Python programming language interpreter on your system.

Operating systemzipexeexe + py
Microsoft Windows 7 (and above) flomh-0.7.zip flomh-0.7-x64.exe flomh-0.7-x64-py.exe

You will need administrator rights to install.

The intermediate application can be installed in "silent" mode (without showing the graphical installer). To do this, run the installer with the /S key. For example:

flomh-0.7-x64.exe /S

Options

The extension parameters can be set in one of two ways: in the extension parameters of the web browser or through an external configuration file.

The external configuration file takes precedence over the extension options in the web browser. If it is set, the extension options in the web browser will not be available.

Configuring the extension in a web browser

This method is suitable if you use a single instance of the extension.

To configure the extension in a web browser, open:

In the page filter, specify the addresses of the pages/sites to which the Extension will be applied.

In the link filter, specify the link addresses that will NOT be processed by the Extension. The web browser will try to open such links on its own.

The filters can use the wildcard character * (asterisk), which means any sequence of characters.

A line break is used as a separator in filters.

Configuring the extension via an external configuration file

This method is suitable for system administrators to centrally configure all extensions, regardless of the browser used.

The external configuration file is a utf-8 encoded json file named options.json located in the directory of the intermediate application (File Links Opener Messaging Host) and having the following structure:

{
  "page_filter": ["file:///*"],
  "link_filter": ["*.htm", "*.html", "*.htm#*", "*.html#*"]
}

In the page filter (page_filter), specify the addresses of the pages/sites to which the Extension will be applied.

In the link filter (link_filter), specify the link addresses that will NOT be processed by the Extension. The web browser will try to open such links on its own.

The filters can use the wildcard character * (asterisk), which means any sequence of characters.

All values must be enclosed in double quotes and separated by commas.

The template of the external configuration file can be downloaded from the link options.json

Default parameter values

The default value for the page filter is "file:///*", which means that the Extension will be applied to pages opened directly from disk.

The dafault values for the link filter are htm/html pages (with and without anchors). This means that html pages on such links will not be opened in the associated application, but in the same browser in which the page containing such a link is viewed.

Other value variants

If you want the extension to work on all sites, just specify the wildcard character * (asterisk) as the value in the page filter.

Using

The File Links Opener extension will only work on those pages whose addresses match the templates specified in the page filter in the options.

When clicking on a suitable link*, its address is sent to the intermediate application, which checks the existence of a file or folder at the specified address and does one of the following:

If the link address points to a folder, if will be opened in the file manager.

If the link address points to a file, it will be opened in the associated application (unless the flo_select_in_fm link parameter is specified).

If neither the file nor the folder at the link address is found, a message will be displayed stating that the corresponding path has not been found.

* A suitable link is a link whose address starts with "file:///" and does NOT match any of the templates specified in the link filter in the options.

Additional link attribute flo_select_in_fm

If you add an additional flo_select_in_fm attribute to the link, the object on the link will not be opened. Instead, the file manager will be opened and the object by reference will be selected in it.

For example:

<a href="file:///path/to/file" flo_select_in_fm>link</a>

Feedback

The author of the File Links Opener extension is Dmitry Unruh.

You can send error messages and suggestions to the email address dmitryunruh@googlemail.com.