N
N
NubasLol2018-10-24 11:45:29
Laravel
NubasLol, 2018-10-24 11:45:29

Laravel mimes xlsx validation not working, is there a way to fix it?

I wrote rules for checking for an exel file, but the xlsx format file does not allow loading
'file' => 'required|file|mimes:xls,xlsx,ods',

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Tratorov, 2020-03-31
@NikitaTratorov

In short, for this case, you need to remove the validation according to the mimes rule and use only the rule

'mimetypes:application/zip,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question