Possible bug with L5 FormRequests and image validation?
Hi guys, could somebody try and confirm if the following is a bug?
Simple setup: Form with a file field, new FormRequest class with image validation for the file field and a php.ini setting with a small upload_max_filesize.
As soon as you upload an image that's bigger than upload_max_filesize, I get an Exception (Serialization of Symfony\Component\HttpFoundation\File\UploadedFile' is not allowed) from /vendor/laravel/framework/src/Illuminate/Session/Store.php in the save() method.
Yep, thats set too. It all works fine when upload_max_filesize is big enough to hold the file. I just wondered what happens if you upload files that are too big and, like I wrote before, it ends in an exception :)
Normally its big enough. To test this I set it to 1M and tried uploading a 2MB image file, hoping laravel would just generate a normal validator message. Like I said, with a bigger ini-value, everything works fine (as long as I don't exceed it with a bigger file (eg. > 50MB while having upload_max_filesize at 50M))
Thanks, but no, I found that (and other links) myself. This is a pure laravel thing. I didn't change any of the internal code (and can't like in your link, just add an interface ;))