max_size fails - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: max_size fails (/showthread.php?tid=80139) |
max_size fails - sfarzoso - 09-17-2021 PHP Code: I have this input: RE: max_size fails - iRedds - 09-17-2021 Example from the documentation https://codeigniter.com/user_guide/libraries/validation.html#rules-for-file-uploads max_size[field_name,2048] RE: max_size fails - InsiteFX - 09-18-2021 post_max_size: 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. PHP Default: 8M upload_max_filesize: The maximum size of an uploaded file PHP Default: 2M RE: max_size fails - sfarzoso - 09-18-2021 I have post_max_size to 100M, same for upload_max_filesize, and memory_limit is 32M I followed the documentation so this should be correct: 'delega' => 'mime_in[delega,application/pdf]|max_size[1024]' but why it fails? RE: max_size fails - InsiteFX - 09-18-2021 try: PHP Code: max_size[4096] RE: max_size fails - sfarzoso - 09-18-2021 4096 kb are 4.096 mb RE: max_size fails - InsiteFX - 09-19-2021 Did you check to see what the size of the file is? Only other thing that will give you error is if the mime type is not recognized. RE: max_size fails - sfarzoso - 09-19-2021 I fixed using max_size[delega,1024] RE: max_size fails - InsiteFX - 09-20-2021 Glad you got it working. |