Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Contents
Table of Contents | ||||
---|---|---|---|---|
|
Introduction
The File Display component is used to facilitate the uploading of and displaying of files in PhixFlow. Images can be Files are previewed and files can have a placeholder image - do you mean a generic image? Like the CSV icon. Serene Grey where this is not possible a generic placeholder image is displayed. The Serene Grey palette provides a number of templates, below is an example of the File Display form field.
File Display components requires require 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 the
to point at this location.Insert excerpt _system_config _system_config name full nopanel true - A special type of table called a File Table to
to hold the information about the uploaded files. This is added using an ERD.Insert excerpt _tableFile _tableFile nopanel true
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
menu, open System → Configuration System →Insert excerpt _administration _administration nopanel true Insert excerpt _system_config _system_config nopanel true - 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 /opt/phixflow/data/file
save your changesInsert excerpt _save_icon _save_icon nopanel true - All uploaded files will now be placed in this directory
- File Table
- On your ERD, add a new
Insert excerpt _tableFile _tableFile nopanel true - All the required fields attributes 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 with a Type of type File in order to create a relationship.
- For Exampleexample, if you wish to upload company logos, create a relationship to a your company table, create a logo attribute of the type File and link to the File Table Primary Key.
Insert excerpt _key_primary _key_primary nopanel true
- For Exampleexample, if you wish to upload company logos, create a relationship to a your company table, create a logo attribute of the 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
Note:
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Uploading Files
- Drag the File Display component from the Serene Grey palette onto your screen
Expand title View Serene Grey Template Serene Grey provides a number of template templates that incorporate the File Display component, each designed to help you tackle a different task.
Form Fields - Defaults
This File Display component is the default for the File data type and is designed to sit inline with the other default form fields.
Basic Layouts
The File Display is a component that provides the functionality of the file display in its raw form ready to be added to a screen or your own design.
Card Containers
File Display Card
A card container which incorporates a read-only File Display component for displaying files and images. Ideal for product images or visual information.
Contact Card
A card container which incorporates a read-only File Display component for displaying files and images in a small circle. Ideal for contact profile images.
- Add a backing attribute by right-clicking on the File Display component and selecting
Insert excerpt _attributes_add_backing _attributes_add_backing nopanel true - 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
ed you can drag files onto the File Display component to populate the data. This populates the fieldInsert excerpt _lock _lock nopanel true - Ensure the File Display form field is added to your save mechanism, like with all form fields, actionflow, so the data is saved
Creating a Download Hyperlink
To create a A text hyperlink can be created that facilitates the downloading of a file.
- On On the screen that is backed by the required table, click Attributes
Insert excerpt _attributes _attributes nopanel true - Navigate the File Table and drag the Url attribute onto your screen.
- A hyperlink will be created that downloads the file associated to the current record, i.e. the file for the record currently on the form.
- The hyperlink component is created using the template defined in the application's Properties → Styles Tab → Default Components Section → Default File Url Component
→Insert excerpt _property_settings _property_settings nopanel true
→ Default Components section → Default File Url ComponentInsert excerpt _property_tabs _property_tabs name style nopanel true
- The hyperlink component is created using the template defined in the application's Properties → Styles Tab → Default Components Section → Default File Url Component
Background Icons
- When the File Display is available for the user to upload a file:
- When the user is dragging a file over the File Display component:
- When the File Display is read-only, this includes when the screen is
ed:Insert excerpt _unlock _unlock nopanel true
These style can be changed using Formatting Rule and the new CSS Drag Over property that can be applied to a CSS Property.
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Basic Settings
Field | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Name |
| ||||||||||||||||
Aggregate Function |
| ||||||||||||||||
Allow file download | When ticked allows
| ||||||||||||||||
Show the file nameWhen ticked |
. | ||||||||||||||||
Show previewWhen ticked |
associated to the File Component . For files where a preview is not possible, such as a CSV, a generic image is displayed which illustrates the file type, e.g. .
. |
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Advanced Settings
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Type |
| ||||||||||
Internal Icon Source |
| ||||||||||
External Icon Source |
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Style Settings
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|