How to upload password protected xlsx file? I tried to upload password protected xlsx with validation but i can't upload.. it throws filetype validation error.
$this->validate($request, [
'evidences' => 'required|max:10240|mimes:xls,xlsx'
]);
Try the same with one not password protected, see if it works. But it may be the mimes is not set correct.
@jlrdw yeah it works with not protected file.
@Tray2 sorry, it doesn't work.
@anandmainali5 Can you try and run this on the file on the commandline
file --mime-type -b filename.xlsx
@Sinnbeck it returns application/encrypted type. and i have tried adding it to mimes but it doesn't work.
@anandmainali5 Try setting it explicitly
'evidences' => 'required|max:10240|mimetypes:application/encrypted'
@Sinnbeck what if there are multiple file validation, where to add the above validation you mentioned?
'evidences' => 'required|max:10240|mimes:doc,docx,ppt,pptx,xls,xlsx,jpg,png,jpeg,gif,pdf'
Please sign in or create an account to participate in this conversation.