I have this input:
PHP Code:
<input type="file" class="d-none" id="featuredImage" accept=".png, .jpg, .jpeg" name="meta[featured_image]">
I set the following validation rule:
PHP Code:
'meta.featured_image' => 'mime_in[meta.featured_image,image/png,image/jpg,image/jpeg]|max_size[meta.featured_image,1024]'
if I upload an image of 5kb all works well, but when I try to upload an image of 3.2Mb I get:
The filetype you are attempting to upload is not allowed.
if I inspect the file heavy image using:
PHP Code:
var_dump($this->request->getFile('meta.featured_image')->getMimeType());
I get "directory", but it's a .jpeg (I have attached the image that causing the issue on this post).
If instead I upload the image of 5Kb and print getMimeType() I get:
"image/png"
I'm running the application over nginx and php-fpm, and I set client_max_body_size 100M; inside location directive of nginx, but I don't think is this the problem.
Any idea?