Why is my upload limit 100mb?It's set to 500mb

I have modified 500MB in app.yml
and then rebiuld
Set here again /admin/site_settings/category/files
But you can’t set more than 100MB.


No matter how I set it up, if I upload more than 100 megabytes, it gives me an error. It’s not really over 500 megabytes, but it still warns me that the file is too large.

I think the image max size 102400kb(100M) is hard coded in Discourse by design. The upload_size in app.yml is for configuring the nginx, you may want to configure the max attachment size kb setting which allows file size max to 1024000kb(1GB).

A 500MB image file rendered directly on the web page is horrible.

2 Likes

I’m uploading some videos to save on the s3. Not pictures.

So you should change max attachment size kb setting not max image size kb

2 Likes

I’ve tried to change it to the maximum limit, but I still can’t upload MP4 files, and it keeps prompting me that I’ve exceeded the maximum limit for a 200MB file.

That’s the post I read to make the changes .


I’ve set the image limit to 4M and the other attachment size to 400MB, but I can’t upload a 200M mp4. I’m using arm server of Oracle cloud.

I’m using the docker version, unmodified.

I thought I had to do that inside the docker image (but It was long ago and I don’t recall 100%).

Is discourse not using php anymore?

And you did a rebuild after you changed that setting?

Rebuilds every time
. /launcher rebuild app

I’m trying to clean it all up and rebuild it.
./launcher cleanup

I suspected for a moment that there was some sort of caching thing going on so that rebuilding wouldn’t change the size of the uploaded file. Tried everything I could find for three days. But the attachment size is still at 100m and I never set it to 100m I set it to 500m in the first place because I had some videos I wanted to be able to upload.

Does it show at 500MB in your site settings?

Yes, the web page shows that the file exceeds the 500m limit. The file is actually 101mb.


The actual video file is only 101MB

I’m using arm hosting from Oracle cloud.

Can you guide me on how to solve such a problem?

Discourse was never a php based product.

I also think that Discourse is not using a php environment. But the problem is that Discourse has set an upload limit of 500mb.
But in reality it’s not possible to upload more than 100mb.

I suspect the problem is related to the logic of the discourse system. Even though I have changed the “upload_size” parameter in “app.yml” to allow uploading files up to 500mb, the image upload limit is still capped at 102400kb, which is equivalent to only 100MB.
I am now uploading a 101mb video, it won’t even upload, it will prompt that the file exceeds the 500mb limit.


Did you see the remark This must be configured in nginx (client_max_body_size) / apache or proxy as well. and act upon it?

cd /var/discourse/
./launcher enter app
cd /etc/nginx/conf.d/
cat discourse.conf
nginx -s reload