laravel 5.1 error in validating doc docx type file

Hi i am facing a docx type validation problem. I tried

$validator = Validator::make($request->all(), [
            'resume'   => 'mimes:doc,pdf,docx'
        ]);

It will upload pdf file with no error but whenever i try to upload docx files it gives validation error 'must be a file of type: doc, pdf, docx'
any idea


thanks solved it by allowing zip

$validator = Validator::make($request->all(), [
            'resume'   => 'mimes:doc,pdf,docx,zip'
        ]);

this is because https://en.wikipedia.org/wiki/Office_Open_XML

链接地址: http://www.djcxy.com/p/45542.html

上一篇: Node.JS textract读取存储在SQL Server中的文件流

下一篇: 验证doc docx类型文件时出现laravel 5.1错误