I’d like my site visitors to be able to upload photos through a simple form. I’m using Statamic CMS (v2) that’s been deployed via Laravel Forge.
client_max_body_size 20M; in the
http section of my nginx.conf file (/etc/nginx/nginx.conf);
I’ve also modified
post_max_sizein two php.ini files (/etc/php/7.4/fpm/php.ini and /etc/php/7.4/cli/php.ini), both to allow 20mb file uploads.
After those modifications I restarted my nginx web server (
systemctl restart nginx).
The good thing: when I try to upload a file larger than 2 mb and submit the form, I no longer get a ‘431 entity too large’ error, but the form just seems to doesn’t work. Like it submits the entry into the void.
Am I overlooking something?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!