How to create attachment uploading and downloading in rasa

Hi All,

How do I implement file uploading and downloading in RASA with custom ui. Is there anything for that like attachments paramter so we can send it through json or something else.

All the available endpoints are described here: HTTP API Does this help you? Also, did you try out Rasa X ?

Yes Tobias I tried RASA X, but there I didn’t get any idea on how to do uplading and downloading.

Can you share any reference so that I can look into that.

What exactly do you want to upload / download?

Yes Tobias,

I am trying to upload document which may be .docx .pdf etc. So bot should take the doc as path or as blob and then I will be able to store it in a database that is what I am trying to do.

what does this file then contain? training data?

The file may be user any document for example resume of cv of candidate

Hi @prashant_kamble ! I’m trying to upload a file too, did you find a solution for your question?

Hi @ines,

I will get back to you afterwards. I have done very rough implementation for file downloading, for uploading I am working on it. :blush:

1 Like

Hi @prashant_kamble did you figure out a solution, for I am also trying to upload a csv. Thank you!

Hi @dasxx179,

Not yet I was busy with some other work. I will look into that if got any I will let you know.

any update on this ? anybody achieved this ?

any one able to achieve the upload document with rasa_web chat ??

Salut @prashant_kamble avez-vous trouvé une solution,car j’essaie également de télécharger un CV candidat en pdf Je vous remercie!

Hi all , I am also trying to download pdf or doc file using rasa … is it possible and if yes how to integrate it any examples ?! . Thanks in advance

Hey, I’m trying to do the same thing, did you guys manage to do it ?

this seems to be a very DIFFICULT to do thing is RASA, since there is no support as such for it … can anyone plz confirm with code snippets if they have donw the Uploading of file ? from rasa chat

Hello rasaTeam! Please did someone find a solution for user uploading file?

Hi All,

We can do this using custom channel or custom connector. In that we can pass extra parameter from our request body into metadata field.

request payload:

        "sender": "username",   
        "message": "are you a bot?",
            "name":<file_path> or <entire file object>

custom channel code snippet: file : (5.5 KB)

credentials.yml code sniipet:

credentials.yml file : credentials.yml (808 Bytes)

custom action server code snippet: file: (1.1 KB)

At the end after getting file data from custom action we can store it wherever we want, either we can store it to local database or we can pass it to any API for storing it onto a different location.

Hope that helps :blush:

1 Like