Page History
...
Define a connection name as described earlier.
- Create an entity, e.g. 'File', in your model.
- Create at least one attribute: File.Id. For convenience add also File.Name, File.Type and File.Size.
- Create an exposed flow.
- Create a page which is put in the flow and is connected.
Create a container of type AQ_File_Upload (and put it on the page) with the following parameters:
Parameter Value Comments Connectionconnection <connection name> Persistence Temporary Mode Multiple files FileInstance File The name of the entity defined in step 2. FileID File.Id FileName File.Name FileType File.Type FileSize File.Size - Create a container of type AQ_InstanceSelectorPlus.
- Let the containment be: File.Id, File.Name, File.Type, File.Size, all of them read-only
- A button 'Delete' (with a corresponding event, connect it in the flow with the AQ_File_Delete service) A download container (see 'Download File')
- Let the parameters be: Parameter 'entity' should be 'File'.
When uploading a file there are default some fields that will be stored. These are:
- ID
- Name (file name)
- ContentType
- .
- CreationDate
- CreatedByUserId
- CASE_ID
It is possible to extend this list to some custom meta data fields. These can be created and updated by using the AQ_File_UpdateMetaData service.
Download File
To get the download file container work, first create a text item with the name 'DownloadText' and enter some text, e.g. Download.
Create a AQ_File_Download container and add the following parameters:
Parameter | Value |
---|---|
Connectionconnection1 | <connection name> |
FileId | File.Id |
ButtonText | DownloadText |
This container can be used in the containment of the instance selector plus and it is ready to use.
Delete File
To be able to delete a file you need a service for that. Create a new service of type 'AQ_File_Delete'. Enter the following parameters:
Parameter | Value |
---|---|
Connection | <connection name> |
FileId | File.Id |
RemoveInstance | True |
This service can be used in the flow when a delete event is triggered. This service can be used directly.
Update Meta Data
Next to the default meta data that are stored, it is possible to define some of your own. These can be specified in the CustomMetaData parameter. This is an example with one meta data.
Parameter | Value |
---|---|
Connection | <connection name>connection1 |
FileId | File.Id |
CustomMetaData | Meta = File.Meta |
Runtime
...
Move a File
Flowing after an upload
..
...