File upload step
File upload step asks a user to upload the file(s) which can be later accessed via the reporting in the Control Room and in the bot variables.
Current maximum file size is 25 MB
Here’s the demo for this step type:
You can add it via the standard new step menu:
It has the following important settings
Number of answers a user can give
Sets the limit of the number of the files to upload
Accepted file types
Limits the file types accepted. You can use extensions (.jpg) or mime types (for example, text/csv).
Allow camera upload
Allows uploading the photos taken directly from the (web)camera of the respondent
Maximum file size in MB
The maximum file size allowed for the upload in MB. If not specified, it’s set at 25 MB
File URL is direct
When used in notifications and response actions, the uploaded file URL will be a direct URL instead of the URL to the chat transcript. Please note that this is a security risk if the uploaded files contain sensitive information as the direct URL can be shared, even though the URL is not permanent and will expire. The default file URL expiration is 1 hour.
Customize the file URL expiration
Set a custom file URL (non-public) expiration, in seconds. This can be also used in the case when the direct file URL is not enabled, as it affects the file URL provided in step variables of the response actions.
File URL is public
When used in notifications and response actions, the uploaded file URL will be a direct public URL. Please note that this is a security risk if the uploaded files contain sensitive information as the direct URL can be shared. The file URL is permanent and will never expire.
Answering is required
When not enabled, the file upload will be optional and the user can continue the bot conversation without uploading any file.
Accessing the uploaded files via the bot variables
If you create a bot variable of step type, selecting the file upload step, then:
To access uploaded file names, comma-separated, use syntax:
To access the uploaded file id, name, and temporary URL, comma-separated, use the syntax:
To access the variable in the script variable:
Example result will be:
Note that the file URL provided is a temporary secret URL that expires in 1 hour by default and can be customized via the step settings.