How to create a upload button using html python for a particular intent?

How to create a upload button using html python for a particular intent ?

Scenario is

User : I want to upload a file to particular path

Bot : Bot has to give the upload form

After clicking the upload button then the file has to store in particular path.

This is my scenario. Please someone can help me.

Thanks in Advance.

Much needed.

Hey @sravanpulluri

As far as I understand, you have your own custom UI that interacts with Rasa’s REST input channel. There’s no recommended way to deal with file uploads.

Based on what you want to archive I have few ideas:

  1. For example, at some point you want user to upload pdf, but your Rasa-bot doesn’t need to process the file. So your bot can predict that next response is “please update your file”, UI parses that, renders the button for upload, and UI can POST this file somewhere.

  2. If you Rasa-bot has to process the file then it’s trickier, because you need to extend the RestInput that is actually talking to your UI inside Rasa, implement additional http endpoint that would accept the files, and then react somehow on the file upload.

I hope that helps.

HI @degiz,

Can you please explain it in steps as i am fa fresher , i have created a form action where i want a button which opens the browsers to select the file .

I am using rasa-web chat for gui

Thank you

Hi @Aashay1, were you finally able to do it ? thanks.