Example: Preview or Download Multiple Files Uploaded from a Previous Task

Follow an example to either preview or download multiple files in a Screen that have been uploaded from a previous Task in that Request.

Overview

Intended audience: Process designers, Web designers, graphic designers, software developers, coding engineers

Tags: Loop control; File Upload control; File Preview control; File Download control; Screen design

If multiple files have been uploaded to a Task within a Request, those files can be previewed and then downloaded from the current Task in that Request.

In the Screen of the Task from which to preview or download those multiple files, use a File Preview control or File Download control, respectively, with a Loop control.

See the following sections regarding how to view and/or configure each control used in this example:

Locate the File Upload Control to Upload Multiple Files

Follow these steps to locate applicable setting information for the File Upload control in this example:

  1. Locate the File Upload control from the Screen page designed to upload multiple files. This Screen is used in the previous Task of the Request that the Request participant uploads those files.

  2. Note the Variable Name setting value for that File Upload control. This example uses the value MultiFileUploadControl.

  3. Configure the Loop control in the Screen from which to preview and download the multiple files uploaded from this Screen.

Configure Controls to Preview Files

To preview multiple files for this example requires the following controls:

Configure the Loop Control to Preview Files

Follow these steps to configure the Loop control to preview multiple files as in this example:

  1. Add the Loop control to the Screen page from which to preview multiple files.

  2. From the Data Source setting, select the Existing Array option.

  3. In the Variable Name setting of the Loop control, enter the Variable Name setting value from the File Upload control. For this example, enter MultiFileUploadControl.

  4. Configure the File Preview control from which to preview the multiple uploaded files.

Configure the File Preview Control

Follow these steps to configure the File Preview control for this example:

  1. Add the File Preview control to the Screen page from which to preview multiple files.

  2. From the File Name setting, enter file.

    This value is required because the Request data stores each file in within a JSON array named from the File Upload control's Variable Name setting value; within this JSON array, each file uploaded to the File Upload control is stored in a JSON object with a unique file ID referenced by the key name file. This value is not case sensitive.

Configure Controls to Download Files

To download multiple files for this example requires the following controls:

Configure the Loop Control to Download Files

Follow these steps to configure the Loop control to preview multiple files as in this example:

  1. Add the Loop control to the Screen page from which to download multiple files.

  2. From the Data Source setting, select the Existing Array option.

  3. In the Variable Name setting of the Loop control, enter the Variable Name setting value from the File Upload control. For this example, enter MultiFileUploadControl. These are the same settings as for the Loop control that contains the File Preview control.

Configure the File Download Control

Follow these steps to configure the File Download control for this example:

  1. Add the File Download control to the Screen page from which to download multiple files.

  2. From the Name setting, enter file.

    This setting is configured for the same reason as that of the File Preview control in this example.