mime types - laravel validation doesnt work for .JPG -


in laravel5 validate picture following code:

public function rules() {     return [         'name' => 'required',         'pic' => 'required|mimes:jpeg,png',     ]; } 

it works files extensions filename.jpg , filename.jpeg doesn't filename.jpg.

however, doesn't return wrong file extension missing file. can help?

try 'pic' => 'required|image' , make sure form has enctype="multipart/form-data" attribute.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -