For some reason, my ~5 MB upload won’t work even though the upload error that Discord shows me says that the limit is 10 MB.

Checking the “Max attachment size” setting in Discourse, I see the following description:

The maximum attachment files upload size. This must be configured in nginx (client_max_body_size) / apache or proxy as well.

I realize that this might be a problem because I’m managing nginx manually instead of letting Discourse manage it. Looking up what the default value is for client_max_body_size, I see that it’s 1 MB. (see: https://stackoverflow.com/a/66777762)

So, I edited /etc/nginx/sites-available/forum.tsuki.games accordingly:

 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 I reloaded nginx:

service nginx reload

Now the upload works!