Attributes
str
Text displayed above the upload button.
Union[List[str], Dict[str, List[str]]]
List of mime type to accept like
["text/csv", "application/pdf"] or a dict like {"text/plain": [".txt", ".py"]}.
More infos here https://react-dropzone.org/#!/Accepting%20specific%20file%20types.int
Maximum file size in MB. Defaults to 2.
int
Maximum number of files to upload. Defaults to 1. Maximum value is 10.
str
default:"config.ui.name"
The author of the message, defaults to the chatbot name defined in your
config.
int
default:90
The number of seconds to wait for an answer before raising a TimeoutError.
bool
default:false
Whether to raise a socketio TimeoutError if the user does not answer in time.
Returns
List[AskFileResponse] | None
The files uploaded by the user.
Example
Ask for a text file
accept parameter to precise the file extension for each mime type:
Ask for a python file