# How to serve .xml files directly from /uploads/default/original/

**URL:** https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708
**Category:** Support
**Created:** [October 10, 2019, 5:44pm UTC](https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708 "2019-10-10T17:44:52Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Pramvir\_Rathee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pramvir_rathee/32/120136_2.png) [@Pramvir\_Rathee](https://meta.discourse.org/u/Pramvir_Rathee)
#### Post date: [October 10, 2019, 5:44pm UTC](https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708/1 "2019-10-10T17:44:52Z")

</div>

My discourse site is very big and I had created custom sitemaps for my site. The traditional discourse sitemap plugin is crashing because the topics query is too big and is timing out for my Database. It is exceeding all kinds of big resources. Thus i made my own static xml sitemaps. Now i need to upload somewhere to serve.  
But discourse only serves images directly uploaded in this folder, not xml. What should I do? Adding xml extension in file upload settings is not helping either.

i want to serve my files as /uploads/default/original/2X/1.xml /uploads/default/original/2X/2.xml like this

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 11, 2019, 12:26am UTC](https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708/2 "2019-10-11T00:26:43Z")

</div>

I think I would add a section in the nginx config to serve them.

You’d add code in app.yml

---

<div class="post-metadata">

### Author: ![Pramvir\_Rathee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pramvir_rathee/32/120136_2.png) [@Pramvir\_Rathee](https://meta.discourse.org/u/Pramvir_Rathee)
#### Post date: [October 11, 2019, 6:52am UTC](https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708/3 "2019-10-11T06:52:39Z")

</div>

you mean volume ? can you please explain a little bit. I need it Urgently.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 11, 2019, 8:39am UTC](https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708/4 "2019-10-11T08:39:42Z")

</div>

Enter the container and edit `/etc/nginx/conf.d/discourse.conf` to have it serve files from /sitemap. You can Google nginx for help on how you might do that.

You can get nginx to reload the config with

```
  sv restart nginx

```

That will solve your immediate problem. The you can go about making changes to app.yml that will make those changes when you rebuild the container.

If that doesn’t make sense and it’s urgent and you have a budget my contact info is in my profile.

---

<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: [June 13, 2023, 10:47pm UTC](https://meta.discourse.org/t/how-to-serve-xml-files-directly-from-uploads-default-original/130708/5 "2023-06-13T22:47:47Z")

</div>


