Laravel mimes validate not fully working. Pleaes help
it weird to me. when my validate is ....|mimes:jpeg,jpg,png,gif, I had 2 main file for test: test.htm and test.jpg so i copy test.jpg and rename their extension.
if i upload test.html yes it error wrong mimes. Ok
if i upload image file i copy before and rename their extension to asd. test.asd my validate mimies stop working it let this file pass. what wrong in this ? No error mimes given and pass
It may be that your OS is hiding the actual file extension, I've seen it happen on Windows when you rename a file the file explorer actually hide the actual file extension so you may end up with "test.asd.jpg" instead of the intended "test.asd".
You can also supplement your validation logic with the mimestype rule ('mimetypes:image/jpeg') for additional confidence that the file under validation is really an image.
@CronjeCor i have try |mimetypes:image/jpeg,image/jpg it still the same.maybe i have to add custom code to my upload function else my DB will be broken :D