Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Define a connection name as described earlier.

  2. Create an entity, e.g. 'File', in your model.
  3. Create at least one attribute: File.Id. For convenience add also File.Name, File.Type and File.Size.
  4. Create an exposed flow.
  5. Create a page which is put in the flow and is connected.
  6. Create a container of type AQ_File_Upload (and put it on the page) with the following parameters:

    ParameterValueComments
    Connectionconnection<connection name> 
    PersistenceTemporary 
    ModeMultiple files 
    FileInstanceFileThe name of the entity defined in step 2.
    FileIDFile.Id 
    FileNameFile.Name 
    FileTypeFile.Type 
    FileSizeFile.Size 
  7. Create a container of type AQ_InstanceSelectorPlus.
    1. Let the containment be: File.Id, File.Name, File.Type, File.Size, all of them read-only
    2. A button 'Delete' (with a corresponding event, connect it in the flow with the AQ_File_Delete service)
    3. A download container (see 'Download File')
    4. Let the parameters be: Parameter 'entity' should be 'File'.
  8. Let the instance selector container be the second container on the page.
  9. The upload container is ready to use.

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: 

ParameterValue
Connectionconnection1<connection name>
FileIdFile.Id
ButtonTextDownloadText

 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:

ParameterValue
Connection<connection name>
FileIdFile.Id
RemoveInstanceTrue

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.

ParameterValue
Connection<connection name>connection1
FileIdFile.Id
CustomMetaDataMeta = File.Meta

 

Runtime

...

Move a File

 

Flowing after an upload

..

...