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

**URL:** <https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654>\
**Category:** Rasa Open Source\
**Created:** [August 17, 2020, 9:51am UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654 "2020-08-17T09:51:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaidehi16](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@vaidehi16](https://forum.rasa.com/u/vaidehi16)\
**Post date:** [August 17, 2020, 9:51am UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/1 "2020-08-17T09:51:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [August 21, 2020, 4:02am UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/2 "2020-08-21T04:02:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vaidehi16](https://avatars.discourse-cdn.com/v4/letter/v/b3f665/32.png) [@vaidehi16](https://forum.rasa.com/u/vaidehi16)\
**Post date:** [August 21, 2020, 4:23am UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/3 "2020-08-21T04:23:39Z")

</div>

Yeah… Okay thanks a lot !

---

<div class="post-metadata">

**Author:** ![forwitai](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/forwitai/32/9832_2.png) [@forwitai](https://forum.rasa.com/u/forwitai)\
**Post date:** [December 29, 2020, 1:09pm UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/4 "2020-12-29T13:09:14Z")

</div>

Hi @vaidehi16, any luck implementing this feature ?

---

<div class="post-metadata">

**Author:** ![vahid\_ce](https://avatars.discourse-cdn.com/v4/letter/v/9fc29f/32.png) [@vahid\_ce](https://forum.rasa.com/u/vahid_ce)\
**Post date:** [April 6, 2022, 4:25pm UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/5 "2022-04-06T16:25:15Z")

</div>

Hi Stephan, how are you sending the attachment to the bot? are you using the metadata? How are you retrieving it in the bot?

---

<div class="post-metadata">

**Author:** ![stephens](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/stephens/32/1632_2.png) [@stephens](https://forum.rasa.com/u/stephens)\
**Post date:** [April 6, 2022, 6:40pm UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/6 "2022-04-06T18:40:47Z")

</div>

You wouldn’t send the attachment to Rasa. You would upload the attachment somewhere (like an s3 bucket). You could then send Rasa something like this:

```auto
Here is my picture id https://my-bucket.s3.us-west-2.amazonaws.com/puppy.png

```

or

```auto
/upload_id{"id_url": "https://my-bucket.s3.us-west-2.amazonaws.com/puppy.png"}

```

Use a regex for the URL.

---

<div class="post-metadata">

**Author:** ![vahid\_ce](https://avatars.discourse-cdn.com/v4/letter/v/9fc29f/32.png) [@vahid\_ce](https://forum.rasa.com/u/vahid_ce)\
**Post date:** [April 6, 2022, 7:39pm UTC](https://forum.rasa.com/t/how-to-upload-attachments-through-the-rasa-bot-and-send-to-the-server/32654/7 "2022-04-06T19:39:51Z")

</div>

Thanks, I am not allowed to store the attachments anywhere. They are to be sent to RASA on the fly without storing them.
