File uploader

Usage

The File uploader component allows users of your app to upload and send files as attachments, for example, to attach receipts to an expense claim, or to add supporting documents to an absence request. You can also include uploaded files in an Extension Kit flow as a Base64 encoded file referenced using Liquid templating, or as another file encoding specified in the Content definition section in the Resources tab.

File uploader component

Behaviour

When you add the File uploader component to your app, the user is able to click the Upload files button to open a documentation navigation browser and select one or more files to upload in the app. The user can also drag-and-drop files into the component. The number of allowed files and combined maximum file size is configurable in the File uploader component.

File uploader component

Once the user has uploaded a file, the file name and the format are displayed.

The user can also deselect files to be uploaded.

Properties

The following File uploader properties are available:

Main

Property Description
Template ID The unique ID of the component.
Title The title to display.
Subtitle A subtitle to include extra details if needed.
Description Adds a text line at the bottom of the component.
Restrict file formats Sets if only certain file formats are accepted. If disabled then all formats are accepted.
File format If Restrict file formats is enabled then the accepted file formats are specified here.
Maximum file size (MB) Sets the maximum file size of the complete upload containing all uploaded files.
Minimum files Sets the minimum number of accepted files.
Maximum files Sets the maximum number of accepted files. 10 is the maximum.

Validation

Property Description
Required field Sets if the field is required. You must then configure the corresponding validation logic in the Logic map.

Interactions

Property Description
Hidden Sets under which conditions the component is hidden according to the validation rules configured in the Hidden rule field.
Disabled Sets under which conditions the component appears disabled according to the validation rules configured in the Disabled rule field..

File content definition

Any file encoding requirement is configured in the Resources tab in Content definition. See Content definition for more details.

If the file must be Base64 encoded, you can use Liquid templating to reference it, as shown in the example below using the following lines:

{% assign fileContentParsed = fileContent.value | split: "base64," -%}
"fileContent": "{{fileContentParsed[1]}}",

Base64 file reference