Image Uploading Size Show Exceeding Though It's Less

Hi

Max size is set to 4 mb:

But when I upload a photo like this (around 2 mb), I get a message saying that it exceeds the 4 mb limit:

Is it a bug or am I missing something?

  • I’m running on 2.4.0.beta6

Did you restart your discourse instance after changing that setting?

2 Likes

I just tried this now with:

./launcher stop app
./launcher start app

And it still shows the same error, could this be related with S3 being used with Discourse?

1 Like

I guess the new update added a hint about fixing this, so here is the full guide for those who face the same issue… it’s all about nginx:

1. Go to nginx folder:

cd /etc/nginx

2. Add this line to your nginx.conf file:

http {
    ...
    client_max_body_size 4M;
}

This will allow nginx to accept files with a max size of 4 megabytes.

3. Restart nginx:

  • If you’re paranoid like me use run systemctl restart nginx
  • Or simply send the nginx restart signal by running nginx -s reload
2 Likes

This topic was automatically closed after 26 hours. New replies are no longer allowed.