When you upload a file that exceeds the upload_max_filezise PHP properly attaches a error message to that uploaded file.
https://www.php.net/manual/en/features.file-upload.errors.php
When uploading files, I have set the limit of the file size to 20mb. It works good, larger files are returned as an error. But, the strange thing happens when user tries to upload a super large file, bigger then it's allowed by php.ini or nginx server settings. We get a nginx error... Now that tells me that laravel file size validation comes after a file is uploaded to a temp doc... But that would be bad, right?
I know that I could include FE validation, and ensure that files are not even sent to the backend, but I'm interested in the backend side... Did someone encounter this, and what would be the solution?
Please or to participate in this conversation.