Skip to main content

File Input

The file input allows users to drop files into the app.

File Input API

Files uploaded are converted and returned as a data URL scheme with a Base64 encoded string.

File Input Base64

The following section details File Input component's specific settings. For more details on the App editor, check the dedicated documentation or the App editor Quickstart:

File Input configuration

NameTypeConnectableTemplatableDefaultDescription
Accepted File Typesarrayfalsefalse"image/*" ; "application/pdf"The types of files you accept to be submitted.
Allow MultiplebooleanfalsefalsefalseIf allowed, the user will be able to select more than one file
TextstringfalsefalseDrag and drop files or click to select themThe text displayed on the file input.
Include Mime TypebooleanfalsefalsefalseIf enabled, the mime type of the file will be included.
Submitted File TextstringfalsefalseSelected fileThe text displayed when a file is submitted.
DisabledbooleanfalsefalsefalseThe state of the file input.

Outputs

NameTypeDescription
resultarrayAn array of objects with a name and data key.
data is the base64-encoded contents of the uploaded file(s).

Event handler

The file component has the following event handler:

  • onFileChange: Trigger one or more runnables when the user uploads a file.