# Een nieuw bestand uploaden naar een discourse AI-persona

**URL:** https://meta.discourse.org/t/uploading-a-new-file-to-a-discourse-ai-persona/310673
**Category:** Development
**Tags:** rest-api, ai, ai-bot
**Created:** [5 juni 2024 om 14:34 UTC](https://meta.discourse.org/t/uploading-a-new-file-to-a-discourse-ai-persona/310673 "2024-06-05T14:34:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![philip-ellis-sp](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@philip-ellis-sp](https://meta.discourse.org/u/philip-ellis-sp)
#### Post date: [5 juni 2024 om 14:34 UTC](https://meta.discourse.org/t/uploading-a-new-file-to-a-discourse-ai-persona/310673/1 "2024-06-05T14:34:52Z")

</div>

I am trying to reverse engineer the API call to upload files to an AI persona, I’ve replicated the call in postman, and it gives me a 200 response back:

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/6/6/966fae776b3f835fde53675209304f9dd81862f8.png)

 ![The image displays a JSON response containing metadata for an uploaded file, including its ID, original filename, filesize, and URLs for accessing the file, while redacting sensitive information like the actual URLs and IDs for privacy purposes. (Captioned by AI)](https://global.discourse-cdn.com/meta/original/4X/4/b/d/4bd2670dc75ed65e82c5657936fbf1f2cbcdbea2.png)

But when I go back to the AI persona, the file is no where to be found. Is there something I’m missing?

---

<div class="post-metadata">

### Author: ![philip-ellis-sp](https://avatars.discourse-cdn.com/v4/letter/p/258eb7/32.png) [@philip-ellis-sp](https://meta.discourse.org/u/philip-ellis-sp)
#### Post date: [5 juni 2024 om 19:27 UTC](https://meta.discourse.org/t/uploading-a-new-file-to-a-discourse-ai-persona/310673/3 "2024-06-05T19:27:57Z")

</div>

Answering my own question here, but I found the answer! You also need to make a put to the AI persona for it to show up there:

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/8/5/e850cfed5e25268c2f19b98cfd1ad7b1fc2064af.png)

Include the ID of the file you uploaded in the put body:

```json
...
"rag_uploads": [
    {"id": 13666}
]
...

```

And now it shows up under the persona!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [5 juli 2024 om 19:28 UTC](https://meta.discourse.org/t/uploading-a-new-file-to-a-discourse-ai-persona/310673/4 "2024-07-05T19:28:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
