I
I
Igor2013-11-29 17:44:43
PHP
Igor, 2013-11-29 17:44:43

xls - mime-type definition

There is some form of .xls file upload. I check the file type using the finfo_file() function.
So, the problem is this.
If you upload xls files made in microsoft office, then the function perfectly determines the file type: application/vnd.ms-excel .
If you load xls - made through LibreOffice, then the function defines the file as: application/vnd.ms-office
openOffice - not tested.
What to do in this situation? Or to hammer, and skip application/vnd.ms-office ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rowdy Ro, 2013-11-30
@GansikUA

You can additionally check for validity through PHPExcel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question