Discourse upload doesn’t work

Uploading a file smaller than the Discourse instance’s “Max attachment size” might still fail if nginx is not configured correctly, which might be the case if you manage nginx manually. 1

By default, client_max_body_size is 1 MB. You’ll want to update this value in the nginx config to whatever the max attachment size is: 1

 server {
     root /var/www/html;
 
     index index.html index.htm index.nginx-debian.html;
     server_name forum.tsuki.games;
+    client_max_body_size 10M;

Then reload nginx: 1

service nginx reload

Footnotes

  1. 20250624094228 2 3