fileEvent
The fileEvent event is triggered when the user sends a file to the bot.
tip
File data
In the state where fileEvent was triggered, you can obtain the file data from the $request.data.eventData object:
[
{
"url": "https://example.com/file.pdf",
"type": "file",
"mimeType": "application/pdf"
}
]
urlis the link to the file.typeis the file type. Possible values:file,image,audio,video.mimeTypeis the file MIME type.
How to use
state: AcceptFile
event!: fileEvent
a: Use the following links to access your files:
script:
$request.data.eventData.forEach(function (file) { $reactions.answer(file.url); });