Versions Compared

Key

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

...

This how-to describes how to use the multiple file upload.

...

Note that IE 9 is not able to handle multiple files, only single files. This is doing fine in IE 10+, Firefox and Chrome.

For this functionality you do not need to install any plugin.

...

Configuration

Please configure the connection in aquima.properties file in the home folder first. Currently there are two connection flavors:

  • Memory

    Code Block
    connection.connection1connection.memory
  • File system

     

    Code Block
    connection.connection1connection.filesystem.path=<your path>

    Replace <your path> with the correct path. Note to use '/' in your path, e.g. C:/Files/.

...

To build this functionality the following steps have to be taken.

  1. Define a connection name (or as in the example project two connections) and distinguish whether it should be in memory or on a file system. In this cookbook 'connection1' and 'connection2' will be used: connection1 uploads to the memory, connection2 to the file system. The aquima.properties file has to be extended by the following entries:

    Code Blockconnection.connection1.memory connection.connection2.filesystem.path=C:/UploadedFiles/

    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 event called 'UploadAction'.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 at on the page) with the following parameters:

    ParameterValueComments
    Connectionconnection1connection 
    PersistenceTemporary 
    ModeMultiple files 
    FileInstanceFileThe name of the entity defined in step 2.
    FileIDFile.Id 
    FileNameFile.Name 
    FileTypeFile.Type 
    FileSizeFile.Size 
    Click the tab 'Events' and select the event 'UploadedAction' at the 'FileUploaded' parameter.
  7. Create a container of type AQ_InstanceSelectorPlus.
    1. Let the containment be:
      1. 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')
    2. Let the parameters be:
      1. Parameter 'entity' should be 'File'.

  8. Let the instance selector container be the second container on the page.

...