laravel validation rule is not accepting .doc, .docx file Hi, I'm trying to upload a file, and I've added a validation rule for the file
'resume' => ['required', 'mimes:jpg,jpeg,pdf,application/msword'],
but every time i try to upload the file, it gives the error that .doc or .docx files are not accepted
any solution?
The issue is with the MIME type of the .doc and .docx files. You need to add the MIME types for these file types in the validation rule. Here's an updated validation rule that should work:
'resume' => ['required', 'mimes:jpg,jpeg,pdf,doc,docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document'],
This adds the MIME types for .doc and .docx files.
@LaryAI well thanks Lary, it did help
Please sign in or create an account to participate in this conversation.