jpg vs jpeg
Ok, I am not sure if this is a bug or that maybe the documentation should be updated.
I added the mimes validation to my validator, just like the documents described:
'image' => 'mimes:jpg,gif,png'
When I uploaded a file with the 'jpg' extension, the validator failed because the file type was not allowed.
So I checked the mime type to be sure it was a JPG image:
peter@PeterMint ~/Desktop $ file --mime-type logo.jpg
logo.jpg: image/jpeg
It seems that "$value->guessExtension()" returns "jpeg" which made my validation fail. As soon as I added 'jpeg' to the validator, everything was fine.
I believe a 'jpeg' should be treated the same as 'jpg'. Or am I mistaken?
It seems that Symfony uses jpeg. Will make note in documentation.
I use mime:jpeg and it accepts jpg as well.