I have a Spring application that reads XLS and XLSX files with Apache POI. In my pc (Windows 8, Firefox, LibreOffice and Microsoft oficce installed). With both types of Excel files correctly detects the type "application / vnd.ms-excel" and "application / vnd.openxmlformats-officedocument.spreadsheetml.sheet" respectively.
In another pc with windows xp and installed libreoffice (not microsoft office), to send me excel files detected as "application / octet-stream". By contrast, with the other files it works well, txt, pdf, jpg ... until ods.
To send the file used a MultipartFile and getContentType ().
My question is why is sending me the wrong type. Where does the data type? The operating system from being sent; perhaps the problem can be by not having Microsoft Office installed? If so unreliable validate it depends on the type of computer from which it is sent.