Loading multiple files in one field using the File component

The updated File component allows uploading multiple files in one form field. All the uploaded files are shown on the form and can be downloaded for viewing.

1. Configuring the updated File component for bulk loading of files

  1. Sign in to the regulations administrator portal.

    import users(officer) 01

  2. Open the Model UI forms section.

    component file multiple values 01

  3. Click Create new form.

    component file multiple values 02

  4. Specify the form’s business name and service name in the corresponding fields.

    component file multiple values 03

  5. In the components panel on the left, select Updated.

  6. Find the File component and drag it onto the modeling canvas.

    component file multiple values 04

  7. Configure the component’s basic settings.

    component file multiple values 05

  8. In the Data tab, select the Multiple Values checkbox. This setting enables loading multiple files in the form.

    component file multiple values 06

  9. Configure the component’s required settings and click Save.

2. How bulk loading of files works

The file size settings of the File component apply to each file in a bulk load. Each file in the form must match the defined format and satisfy the maximum or minimum file size requirements.

The maximum and minimum size of each file is determined by the File Maximum Size and File Minimum Size fields.

The maximum and minimum total size of all the files is determined separately by the Maximum total size and Minimum total size fields.

Limits on the total volume of multiple files loaded through a business process:
  • When modeling a form for uploading multiple files (the Multiple Values checkbox in the Data tab of the File component is selected), two fields appear in the File tab:

    • Maximum total size: Set the maximum total size of all uploaded files.

    • Minimum total size: Set the minimum total size of all uploaded files.

  • The maximum possible value for the Maximum total size field is 100 MB. This value is set by default; a user can only change it to a smaller number. This ensures compliance with the technical restrictions set by the registry administrator.

  • These limits apply separately to each file field (each upload widget) on the form, not to the entire page.

  • If the total volume of the uploaded files exceeds 100 MB, the system displays the following message below the upload field:

    "Total size of uploaded files exceeds 100 MB".

component file multiple values 08
Figure 1. The maximum total size of files loaded through one File component
  1. Specify the allowed file format for uploading in the File Pattern field.

    The system uses a save_digital_document() function to load the files (digital documents) into the registry.

    This function enables the system to automatically validate files uploaded through the UI forms in the user portals. The validation checks whether the files comply with specific restrictions, such as allowed file types.

    The system supports uploading the following file formats:
    • "application/pdf": "pdf"

    • "image/png": "png"

    • "image/jpeg": "jpg", "jpeg"

    • "text/csv": csv

    • "application/octet-stream": "asics"

    • "application/pkcs7-signature": "p7s"

    You can specify the format as application/pdf or simply .pdf.

    Separate several formats by commas.

    component file multiple values 08 3
  2. Specify any value for the maximum total size of all uploaded files—​for example, 10 MB.

  3. Specify any value for the minimum total size of all uploaded files—​for example, 1 MB.

    component file multiple values 08 1
    Figure 2. Setting the restrictions in the File component’s settings
    component file multiple values 08 2
    Figure 3. Uploading one file
    component file multiple values 09
    Figure 4. Uploading multiple files in different formats

All files uploaded at once must have unique names if they are in the same format.

component file multiple values 11

The updated File component supports uploading multiple files through the File Upload window or dragging and dropping multiple files at once. You can also add the files one by one.

component file multiple values 07

All uploaded files are displayed on the form. You can delete each file separately by clicking the cross (x) icon next to the file name. You can also click the file name to download it for viewing.

component file multiple values 10

For security reasons, users cannot upload files where the extension has been manually changed. The content of the file uploaded into the system must match its extension. For example, if you change the Word file’s extension to .pdf and try to upload it through the user portal, the system will return a validation error.

component file multiple values 12