File bridge asset
The file bridge asset lets you connect Matrix to a file system on the same server as your Matrix system. It creates a representation of the file system as assets within the asset tree.
The files and folders on your server will be displayed within Matrix as physical file and physical folder assets.
These assets allow you to view and browse the files within the system; however, you will not be able to move or modify them.
The files displayed through a file bridge can be imported into the system using the
File bridge import tool.
For more information, refer to the importing files into Matrix section of this chapter.
When you create a file bridge, the create new file bridge screen appears, allowing you to name the file bridge and displaying the server path.
The details section of this screen:
To add a file bridge:
Complete the following fields:
Enter a name for the file bridge.
Set an absolute path that the Apache user has read access to, allowing Matrix to access the file information.
This path can be set in the system’s
file_bridge.incfile, located in the
The file bridge will not function correctly if the file system path contains a file or folder with the incorrect permissions.
By default, this path will be set to your system’s
The files and directories of the file system will appear as shadow assets in the asset tree.
The files of a file bridge can be browsed and viewed in the same manner as other assets.
View the contents of a file by right-clicking on the physical file asset in the asset tree and select view file, as shown:
The View file screen will appear:
|You will not be able to edit the contents of these files within Matrix.|
The file bridge can be used to import files into Matrix using the
File bridge import tool and the
These files will be created as corresponding asset types within Matrix, where available.
For example, an image file will be imported as an image type asset.
To access the
File bridge import tool:
Click the Tools in the toolbar.
File bridge import tool.
File bridge import toolscreen will appear.
The fields available are as follows:
- File bridge root node
Select the file bridge asset or a file or folder beneath it to act as the root node, determining which files to import.
If the file bridge asset or a folder is selected, the
File bridge import toolwill import the top-level files and folders underneath it, rather than importing the selected asset. By default, the contents of these folders will not be imported.
If a file is selected, only that file will be imported.
- New parent node
Select the asset under which you want to create the imported files. In the figure above, this is the new parent node folder.
In the figure above, the
File 3file asset has not been imported as it is not a top-level child of the file bridge. Select this option to import the contents of any folders underneath the file bridge root node, as shown in the figure below.
Select this option to import the
index.htmlfile as a standard page asset, replacing the folder containing this index file. This option is disabled by default.
- Allow virus scan
Enabling this option will perform a virus scan on each imported file. This scan will potentially slow down the import process. The virus checker must be enabled on the External tools configuration screen.
import_files_from_bridge script will import the files exposed by a file bridge asset and is located in the
This script takes the following parameters:
The system root directory.
The asset ID of the file bridge asset from which to import files.
The asset ID of the parent under which to import the files.
Optional: Whether to import the contents of any folders underneath the specified file bridge root node.
This script will only import files from the root directory by default.
Optional: Whether or not to import
index.htmlfiles as standard page asset with the content of the index file. It is disabled by default.
$ php import_files_from_bridge.php <system_root> 100 150 y y Start importing Finished