0
如果我想上传img,它会失败。 * .png文件可以。 图像尺寸是可以接受的。 没有验证器,* .png上传没有任何问题。Laravel Validator尝试上传img文件时失败
$validator = Validator::make([
'image' => Input::file('img')
], [
'image' => 'mimes:png, jpg, jpeg | max:5120'
]);
if($validator->fails())
{
return 'Error is occured while uploading file.';
}
你的意思是'* .png'不是吗? – lukasgeiter 2015-02-06 09:46:29
对不起,我的意思是* .png文件... – yigitozmen 2015-02-06 09:47:03