I am using the filemanager for images, now we need another one for documents, but we need to restrict to only doc, docx, xls, xlsx, pdf and some image types.

I have changed the default regex rule, to make the new validation:

$this->options['inline_file_types'] = '/(\.|\/)(gif|jpe?g|png|pdf|doc|docx|xls|xlsx|PDF|JPG|DOC|DOCX)/';

$this->options['accept_file_types'] = '/(\.|\/)(gif|jpe?g|png|pdf|doc|docx|xls|xlsx|PDF|JPG|DOC|DOCX)/';

But this new rule always gives me Filetype not allowed on a .doc, xls and xlsx file.

Can someone explain me the regex code to limit to this file extensions or tell me why this one is failing?

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top