# How to increase the upload file size limit? Error shown

**URL:** https://meta.discourse.org/t/how-to-increase-the-upload-file-size-limit-error-shown/332467
**Category:** Support
**Created:** [October 24, 2024, 3:57am UTC](https://meta.discourse.org/t/how-to-increase-the-upload-file-size-limit-error-shown/332467 "2024-10-24T03:57:34Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![prty\_grl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/prty_grl/32/333698_2.png) [@prty\_grl](https://meta.discourse.org/u/prty_grl)
#### Post date: [October 24, 2024, 3:57am UTC](https://meta.discourse.org/t/how-to-increase-the-upload-file-size-limit-error-shown/332467/1 "2024-10-24T03:57:34Z")

</div>

The composer shows that I exceed the file size limit.

I want to increase the upload file size (attachments) in composer. So, I increased it in the settings. I noticed I have to increase it nginx as well. But I don’t use nginx and it has been disabled in AWS (and I don’t want to use reverse proxy as ssl and everything will need to be set up).

I don’t see any nginx in the application folder after I do the following, it opens up with empty file.

```plaintext
sudo ./launcher enter app
cd /etc/nginx/conf.d/
nano discourse.conf'

```

I listed the files as well, but it doesn’t even have “etc” folder in it.

That means nginx is not even present in the discourse folder.

Then as an alternative, I added file size under params, hoping that discourse would pick the setting up after rebuild.

sudo nano containers/app.yml

```plaintext
params:
    nginx:
    client_max_body_size: 1000m

```

But no success. Still shows the error file size should not exeed bla bla bla.

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [October 24, 2024, 4:40am UTC](https://meta.discourse.org/t/how-to-increase-the-upload-file-size-limit-error-shown/332467/2 "2024-10-24T04:40:09Z")

</div>

Add this at the bottom of your app.yml in custom commands, then rebuild:

```plaintext
## Any custom commands to run after building
run:
  - exec: echo "Beginning of custom commands"
  - replace:
        filename: "/etc/nginx/conf.d/discourse.conf"
        from: /client_max_body_size.+$/
        to: client_max_body_size 1000m;

```

---

<div class="post-metadata">

### Author: ![prty\_grl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/prty_grl/32/333698_2.png) [@prty\_grl](https://meta.discourse.org/u/prty_grl)
#### Post date: [October 24, 2024, 5:11am UTC](https://meta.discourse.org/t/how-to-increase-the-upload-file-size-limit-error-shown/332467/3 "2024-10-24T05:11:13Z")

</div>

It worked. Thank you.

---

<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: [November 23, 2024, 5:11am UTC](https://meta.discourse.org/t/how-to-increase-the-upload-file-size-limit-error-shown/332467/4 "2024-11-23T05:11:52Z")

</div>

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