How to upload attachments through the rasa bot and send to the server?

I wanted the following conversation to be executed in the bot.

User : I want to upload the files

Bot: Displays Attachments button

(User clicks on the button and chooses the file from his local system to be uploaded )

Bot: (displays the file choosen by the user and uploads that to the server by http POST request)

Kindly help solve this Usecase.

PLease

Thanks & Regards,

Vaidehi

Vaidehi, welcome to the Rasa forum.

The bot could present the buttons but from the point where the user clicks the upload this would need to be handled by your UI (React component or UI of your choice). Also, you would not be uploading the file to Rasa (this is not a chatbot feature). You’ll need another service to handle the file.

If the file is related to your bot dialog, your UI could issue an intent possibly with an entity set to the file name or other metadata associated with the uploaded file. You might send the intent on completion of the upload to continue the dialog.

Greg

Yeah… Okay thanks a lot !

Hi @vaidehi16, any luck implementing this feature ?