I have a problem with the validation of images or mimes overall.
This is my code:
$this->validate($request, [
'title' => 'required|max:50',
'content' => 'required|min:20',
'description' => 'required|max:140',
'file' => 'image'
]);
When I try to upload any file I get the error:
The file failed to upload.
When I dont have the image flag, everthing just works fine.
I can put things like required or max:5000.
I looked at the documentation and it should work, but it doesn't.
So what am I doing wrong?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2jf2Jnm
via IFTTT
Aucun commentaire:
Enregistrer un commentaire