Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is for anyone who needs to reference files on the PhixFlow Server.

Understanding the Soft Link Between Tomcat and PhixFlow

When you want to reference a file saved on the PhixFlow server, you need to use a path that the PhixFlow Webapp can understand. The PhixFlow webapp runs within Tomcat, so only knows about files below  /opt/tomcat/webapps/phixflow 

...

Soft link in Tomcat directory
points to → 
Soft link in PhixFlow server
points to → 
Directory containing files
/opt/tomcat/webapps/phixflow/datalink

/opt/phixflow/data/phixflow/datalink/MyProject/

/opt/phixflow/data/phixflow/Projects/MyProject/

Configuring Soft Links

...

To ensure soft links from Tomcat to PhixFlow directories are secure, configure context.xml as follows:

  1. Edit /opt/tomcat/conf/context.xml
  2. Find the line: <Resources cachingAllowed="true" cacheMaxSize="1000000" />
  3. Replace it with: <Resources allowLinking="true" cachingAllowed="true" cacheMaxSize="1000000" />

In the following commands:

  • path/folder_name is the full path to the directory to which you want to link
  • soft_link_name is the directory name that appears you want to use as a soft link in the current locationdirectory.

On Linux

...

use the ln command

...

...

ln

...

-s

...

path/folder_name

...

soft_link_name

...

If a file path includes spaces, enclose it in double-quotes

On Windows

...

In the directory where you want to create the symlink, enter the following mklink command. 

...

use the mklink command

mklink /D soft_link_name

...

path/folder_name

...

To soft link to a specific file, omit /D.

For more information about symlinks, see this article on Creating Symbolic Links.

The Path or URL to Use

Within PhixFlow, to refer to a file on the server, start the path with the datalink directory.

Examples:

  • file path:   datalink/Project1/Images/file1.png
  • URL:   url("https:datalink/MyProject/MyImage.png")

Using a URL to Display an Image 
Anchor
use_image
use_image

In your PhixFlow application, to display an image stored on the PhixFlow server, use the URL for it's location, for example:  url("https:datalink/MyProject/MyImage.png").

...