I use Nginx instead of Apache and besides setting the size limit on the php.ini file I also have to add this line to the Nginx config file: client_max_body_size 70M;
post_max_size integer
Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size. When an integer is used, the value is measured in bytes. Shorthand notation, as described in this FAQ, may also be used.
If it doesn’t exist, you can create that line.
You can set post_max_size to 0 to allow unlimited post size.
Hi, apologies for reviving this but I’m running into a similar issue.
I’m attempting to upload files that are roughly 5-7mb in size, and when doing so I see an error in the DevTools that states:
{"status":"error","code":5,"message":"The file is too big. The maximum size is 2 MB in file: \/Users\/blahblah\/Documents\/Code\/clientxyz\/Web\/kirby\/vendor\/getkirby\/toolkit\/lib\/upload.php on line: 198"}
I’ve read some of these forums and can not find any php.ini file in my Kirby set up.
I did attempt to update the blueprint with this, as found in Kirby 2 docs (I can’t seem to find that same doc after the Kirby 3 update) :
files:
sortable: true
size: 10485760
fields:
title:
label: Title
type: text
The php.ini is not in the Kirby setup, it is somewhere on your server. Often, hosting providers offer a control panel where you can set those things or they tell you somewhere in the docs how you can edit the php.ini.
I realized it was an issue with my local server on the command line, which I was able to resolve by just moving the files via Finder.
As per where the site is hosted, my client is set up on GoDaddy and I’ve confirmed that the file upload works as intended via the browser. False alarm, thank you!