PhixFlow Help
Referencing Files on the PhixFlow Server
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
For the webapp to know about files stored on the server, for example in /opt/phixflow/data/phixflow
, it has a symbolic link, or soft link. This acts as a shortcut between the two directories and lets the PhixFlow webapp "see" the files under /opt/phixflow/data/phixflow/datalink
.
Soft link in Tomcat directory | points to → | PhixFlow server directory containing files |
---|---|---|
/opt/tomcat/webapps/phixflow/ datalink |
|
For more information about symlinks and how to create them, see this article on Creating Symbolic Links.
You may not want to save files under the datalink directory on the PhixFlow server. For example, you could have a directory for each project, and the files belong to a specific project. In this case, you can add a second soft link.
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/Projects/MyProject/ |
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
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").
For example, you can configure the following CSS Properties to use an image stored on the PhixFlow server as a background image.
- Name: background-image
- Expression: url("https:datalink/MyProject/MyImage.png")
- Name: background-repeat
- Expression: no-repeat
- Name: background-size
- Expression: choose size – could be 100%, 20px, auto; see Image Sizing.
Please let us know if we could improve this page feedback@phixflow.com