Introduction
The File Display Gallery component is used to facilitate the uploading and displaying of multiple files in PhixFlow. Files are previewed and 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 Gallery form field.
File Display Gallery components require the following key items in order to function:
- A directory on the server to store the uploaded files and an entry in the
Insert excerpt |
---|
| _system_config |
---|
| _system_config |
---|
name | full |
---|
nopanel | true |
---|
|
to point at this location - A special type of table called a
Insert excerpt |
---|
| _tableFile |
---|
| _tableFile |
---|
nopanel | true |
---|
|
to hold the information about the uploaded files- This is added using an ERD
- A
Insert excerpt |
---|
| _tables |
---|
| _tables |
---|
nopanel | true |
---|
|
containing an attribute called folderId and of type, string, that is related to the above Insert excerpt |
---|
| _tableFile |
---|
| _tableFile |
---|
nopanel | true |
---|
|
via this attribute- 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
Insert excerpt |
---|
| _administration |
---|
| _administration |
---|
nopanel | true |
---|
|
menu, open System → 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. /opt/phixflow/data/file
Insert excerpt |
---|
| _save_icon |
---|
| _save_icon |
---|
nopanel | true |
---|
|
save your changes- 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 attributes are added by default and cannot be modified
- Table
- On your ERD, use an existing or add a new
Insert excerpt |
---|
| _tables |
---|
| _tables |
---|
nopanel | true |
---|
|
- Create a new attribute:
- Name:
folderId
- Type:
String
- Create a Relationship from the folderId attribute on the
Insert excerpt |
---|
| _tableFile |
---|
| _tableFile |
---|
nopanel | true |
---|
|
to the folderId attribute on the the Insert excerpt |
---|
| _tables |
---|
| _tables |
---|
nopanel | true |
---|
|
- Data can now be saved directly to this table or via a relationship
Uploading Files
- Drag the File Display Gallery component from the Serene Grey palette onto your screen
Expand |
---|
title | View Serene Grey TemplateSerene Grey provides a number of templates that incorporate the File Display Gallery component, each designed to help you tackle a different task.
This File Display Gallery component is designed to sit inline with the other default form fields.
Image Modified
Basic Layouts
The File Display Gallery is a component that provides the functionality of the file display gallery in its raw form ready to be added to a screen or your own design.
Image Modified
- Add a backing attribute by clicking on the component until the properties for the inner component, File Display Gallery, displays on the right
- On the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
nopanel | true |
---|
|
, in the Backing Attribute section, click the Insert excerpt |
---|
| _attributes_add_backing |
---|
| _attributes_add_backing |
---|
name | icon |
---|
nopanel | true |
---|
|
icon - Select Choose the folderId attribute on your
Insert excerpt |
---|
| _tables |
---|
| _tables |
---|
nopanel | true |
---|
|
- For the full list of properties for the File Display Gallery component, see File Display Gallery Properties
- Ensure the File Display Gallery form field is added to your save actionflow, so the data is saved
- Now, with your screen ed you you can drag multiple files onto the File Display Gallery component to populate the data. This populates the fieldEnsure the File Display Gallery form field is added to your save actionflow, so the data is saveddata
Image Added
Creating a Download Hyperlink
A text hyperlink can be created that facilitates the downloading of a file.
- On the screen that is backed by the required table, click
Insert excerpt |
---|
| _attributes |
---|
| _attributes |
---|
nopanel | true |
---|
|
- Navigate to 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
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
→ Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
→ Default Components section → Default File Url Component
Background Icons
The background icons for the Further Reading
indicate the following:When the File Display Gallery is available for the user to upload a file:- Image Removed
When the user is dragging a file over the - Properties for the full list of properties for the File Display Gallery component
: Insert excerpt |
---|
_check_box_untick | _check_box_untick | nopanel | true |
to display an appropriate holding image illustrating the file type for the record. Insert excerpt |
---|
Component | Component | name | _backingAttribute |
---|
nopanel | true |
---|
Insert excerpt |
---|
Component | Component | name | _preferredParentCategory |
---|
nopanel | true |
---|
Advanced Settings
Field | Description |
---|
Type | Insert excerpt |
---|
Component | Component | name | _type |
---|
nopanel | true |
---|
Internal Icon Source | Insert excerpt |
---|
Component | Component | name | _internalIconSource |
---|
nopanel | true |
---|
External Icon Source | Insert excerpt |
---|
Component | Component | name | _externalIconSource |
---|
nopanel | true |
---|
Insert excerpt |
---|
Component | Component | name | _description |
---|
nopanel | true |
---|
Insert excerpt |
---|
_property_tabs | _property_tabs | name | style-h |
---|
nopanel | true |
---|
Insert excerpt |
---|
Component | Component | name | _styles |
---|
nopanel | true |
---|
Style Settings
Insert excerpt |
---|
Component | Component | name | _styleSettings |
---|
nopanel | true |
---|
Insert excerpt |
---|
_property_tabs | _property_tabs | name | action-h |
---|
nopanel | true |
---|
Insert excerpt |
---|
Component | Component | name | _eventHandlers |
---|
nopanel | true |
---|
Insert excerpt |
---|
Component | Component | name | _dropTargets |
---|
nopanel | true |
---|
Insert excerpt |
---|
_access | _access | nopanel | true |
---|
Insert excerpt |
---|
_audit | _audit | nopanel | trueImage RemovedWhen the File Display Gallery is read-only, this includes when the screen is Insert excerpt |
---|
_unlock | _unlock | nopanel | true |
ed:- Image Removed
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 |
---|
_property_tabs | _property_tabs | name | basic-h |
---|
nopanel | true |
---|
Insert excerpt |
---|
Component | Component | name | _parentDetails |
---|
nopanel | true |
---|
Basic Settings
Field | Description |
---|
Name | Insert excerpt |
---|
Component | Component | name | _name |
---|
nopanel | true |
---|
Aggregate Function | Insert excerpt |
---|
Component | Component | name | _aggregateFunction |
---|
nopanel | true |
---|
Allow file download | Insert excerpt |
---|
_check_box_tick | _check_box_tick | nopanel | true |
to allow users to click on a File Component to download the associated file.Show the file name | Insert excerpt |
---|
_check_box_tick | _check_box_tick | nopanel | true |
to display the name of the file associated to the File Component.Show preview | Insert excerpt |
---|
_check_box_tick | _check_box_tick | nopanel | true |
to display a preview of the file 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. Image Removed.