Giving it a run-through on my test site (4b561277a9) with no changes to any max settings or file limits and it uploads fine for me if I add pdf to authorized extensions, and gives the correct error message of ‘Sorry, the file you are trying to upload is not authorised’ when it’s reset to default.
Is there something else I could try to see if I can replicate?
No, as that file size is under the default nginx size limit. However that is a good clue.
The site @Julien_Palard self-hosts has a custom reverse-proxy between Discourse and the browser, so that error is probably coming from a misconfigured reverse proxy.
I’m getting a 413 Request Entity Too Large from nginx so clearly I have to dig further to understand why a “big” image is OK but a “not so big” PDF is not…
The 3.0MB JPG have a Content-Length of 557215 so 0.5MB surprisingly!
The 2.3MB PDF have a Content-Length of 2460137 so 2.3MB unsurprisingly.
Does Discourse rescale the jpg before uploading it?
On my passing JPEGs I see the image width and height as different after uploading them to Discourse (Tried with https://apod.nasa.gov/apod/image/2209/DSCF4968_PS_Lioce.jpg, it’s a 5703x3892, 3.6MB picture, but once uploaded it’s a 1920×1310 of 153 KB one.