tallaljamshed
4 months ago
507
3
Laravel

uploading word docs from a mac in laravel

Posted 4 months ago by tallaljamshed

I had this problem when user is uploading a word document and my web application says invalid file type . The file is .docs and my validations are

'mimes: pdf,xlsx,xls,ppt,pptx,doc,docx' , 
'mimetypes: application/pdf,application/vnd.ms-excel,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation'

which are valid for alot of other word files . turns out that specific .docx file was being read as

application/octet-stream

and then i found out it happens with MAC BOOK users. now what can i do to solve this issue to keep my validations and also validating word files from MAC BOOKS

Please sign in or create an account to participate in this conversation.