Contents
Introduction
The File Display component is used to facilitate the uploading of and displaying of files in PhixFlow. Images can be previewed and files can have a place holder image. Serene Grey provides a number of templates, below is an example of the File Display form field.
File Display components requires the following key items in order to function
- A directory on the server to store the uploaded files and an entry in System Configuration to point at this location.
- A special type of table called a File Table to hold the information about the uploaded files. This is added using an ERD.
Initial Setup
In order to store an uploaded file the following must be completed:
- Directory
- On your server, create a directory where the files will be uploaded. This should be accessible to the application.
- In PhixFlow, from the Administration menu, open System → Configuration
- In the System Directories section → File Table Upload Location field add the address of the directory setup in the first step e.g. C:\Tomcat\webapps\phixflow\data\images
- save your changes
- All uploaded files will now be placed in this directory
- File Table
- On your ERD, add a new File Table
- All the required fields are added by default
- If required, create a relationship between this File Table and your desired target table. The target table will require an attribute of type File in order to create a relationship.
- For Example, if you wish to upload company logos create a relationship to a your company table, create a logo attribute of type File and link to the File Table Primary Key.
- Data can now be saved directly to this table or via a relationship
- On your ERD, add a new File Table
Uploading Files
- Drag the File Display component from the Serene Grey palette onto your screen
- Add a backing attribute by right-clicking on the File Display component and selecting Add Backing Attribute
- Select the Primary Key from your File Table if you are saving directly to the table or use the relational attribute (foreign key) on your related table
- Now, with your screen Locked you can drag files onto the File Display component to populate the data. This populates the field
- Ensure the File Display form field is added to your save mechanism, like with all form fields, so the data is saved
Properties Tab
Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'Component Properties For Excerpt'.