Versions Compared

Key

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

...

  1. Define a connection name as described before.

  2. Create an entity, e.g. 'File', in your model.
  3. Create at least one attribute: File.Id. This attribute is needed to store the id of the file, and without this attribute this functionality does not work. When handling files it is often practical to use a few other attributes such as File.Name, File.Type and File.Size. Create these attributes too.
  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 place it on the page with the following parameters. For more information on the parameters of this container see the Container type: AQ_File_Upload.

    ParameterValue
    Connection<connection name>
    PersistenceTemporary
    ModeMultiple files
    FileIDFile.Id
    FileNameFile.Name
    FileTypeFile.Type
    FileSizeFile.Size
  7. Create a container of type AQ_InstanceList.
    1. Let the containment be: File.Id, File.Name, File.Type, File.Size, all of them read-only
    2. 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.

...

Create a AQ_File_Download container and add the following parameters:

ParameterValue
Connection<connection name>
FileIdFile.Id
ButtonTextDownloadText

This container can be used in the containment of the instance list and it is ready to use.

...

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.

...

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 of the Service call type: AQ_File_UpdateMetaData service. This is an example with one meta data.

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

The previous steps are needed for a simple and complete application. The following services and constructs can be used in more specific situations.

...

Is is possible to retrieve the meta data when providing an Id.

ParameterValue
Connection<connection name>
FileIdFile.Id
FileNameFile.Name
FileTypeFile.Type
FileSizeFile.Size

Move a File

By using the AQ_File_Move it is possible to move a file from one connection to another connection. This could be useful when uploading to memory by default, adding some meta data and storing it on the file system afterwards. This service can be used by entering the following parameters.

ParameterValue
ConnectionFrom<connection name from one system>
ConnectionTo<connection name to another system>
FileIdFile.Id

Trigger a flow when uploading

...

UI Expand
titleRelated articles

Content by Label
showLabelsfalse
max5
spacesBKB
showSpacefalse
sortmodifiedshowSpacefalse
reversetrue
typepage
cqllabel in ("file","labelsfile_handling file

 

...

") and type = "page" and space = "BKB"
labelsfile_handling file

...