[bug] How to increase allowed attachment size? FILE_SIZE_LIMIT not working
Is there an existing issue for this?
- [X] I have searched the existing issues
Current behavior
When a image bigger than 5MBs is uploaded the system give an error.
File size too large. Please select a file smaller than 5MB.
To increase this limit, I tried to change FILE_SIZE_LIMIT to 15728640 in .env a restart the services, both with ./setup.sh script and directly docker compose up -f and after the services are up again the same error happens when trying to upload a big file.
Steps to reproduce
Create an issue an try to upload a 6MB file
Browser
Safari, also in Firefox
Version
Self-hosted
@Plorenzo I had also to increase the Nginx max body size:
I just check and the nginx config in the container is correctly updated already from the .env file
@Plorenzo hope you have changed the .env file
@mguptahub please refer to my original comment
... I tried to change FILE_SIZE_LIMIT to 15728640 in .env a restart the services ...
I ran into this too. Good news, read through.
I have verified that setting FILE_SIZE_LIMIT and restarting updates the nginx.conf in the proxy container.
For example, mine looks like
...
client_max_body_size 134217728;
...
When I upload a file that is 20 MB, it failed with a 413 Request Entity Too Large. But, it would not show up in the "proxy" container logs. Why is that?
Turns out, I had to update the outer nginx layer that reverse proxied towards the container, as the outer nginx layer handles HTTPS with certbot.
(host nginx) -> [docker nginx proxy container -> api container]
^^^^^^^^^^
Failure was in the host.
If you run into this, check every layer of your implementation!