File Upload

File Upload steps enable your bot users to upload files during a conversation. This feature is crucial for processes like document submission, identity verification, and other tasks requiring file handling.

Adding and configuring File Upload steps

To add and configure a File Upload step in a DRUID flow:

  1. Open the desired flow in Flow Diagram view.
  2. Expand the Flow Palette, then drag the File Upload step from the Dialog category into the main flow window and drop it onto the step you want to link it to.
  3. Select the step on the diagram, then click the Settings icon from the Actions menu.
  4. Set the General parameters:
    • Step name: Enter a descriptive name for the step to clarify its purpose (e.g., "Upload Identity Card"). This name is for internal use and helps you document the flow and understand analytics reports.
    • Step message: Enter the message the bot will display to the user when it reaches this step, like "Upload the file here".
    • Note:  Uploaded files are stored in the system entity known as [[File]]. You can store files in specific entity fields by specifying the field in Input Mapping.
  5. Set file restrictions if you need to restrict the types of files users can upload.

  6. Click Save to save the step settings.

Set file restrictions

DRUID supports the following file extensions:

pdf png mkv
doc jpg webm
docx jpeg csv
xls tiff txt
xlsx tif json
odt mp3 vcf
ods mp4 xml (supported in DRUID 8.5 and higher)

If a user attempts to upload an unsupported file type, the bot will respond with a default or customized error message defined as set in the UploadFileFailed special message (bot Details > Dialogue Management > Special messages).

To restrict the types of files users can upload, click on the Metadata section and set the desired file restrictions:

  • Allowed file types: Select the allowed file extensions. In DRUID versions prior to 8.7, enter the allowed file types separated by comma followed by a space (e.g., .pdf, .png, .jpg, .docx).

  • Max allowed size (KB): Define the maximum file size in kilobytes.

When file restrictions are set, if an upload fails validation (e.g., wrong file type), DRUID will raise exception [[SystemError]].ExceptionType == “UnsupportedFileType” which you can handle in the flow. For more information, see Exception Handling on Flow Steps with Input Mapping.

Important!   For mobile channels like MS Teams on mobile, uploaded images may automatically change to a .png extension. The antimalware check accommodates mismatches between the file extension and its signature (e.g., .png files with .jpg content).