M
M
myspace2017-05-08 17:02:54
Node.js
myspace, 2017-05-08 17:02:54

Why do xls documents have such a mimetype?

Allowed types

let allowedMimetypes = [
    'image/jpeg',
    'image/jpg',
    'image/png',
    'image/gif',
    'application/pdf',
    'application/zip',
    'application/x-rar-compressed',
    'application/vnd.ms-excel',
    'application/vnd.ms-office',
    'application/vnd-xls',
    'application/msword',
    'application/doc',
    'application/vnd.msword',
    'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
    'application/xls',
    'application/x-xls',
    'text/plain',
    'application/vnd.ms-excel',
    'application/msexcel',
    'application/x-msexcel',
    'application/x-ms-excel',
    'application/x-excel',
    'application/x-dos_ms_excel',
    'application/excel'
];

xlsx passes fine. But xls does not want to. When checking the mimetype, it gives "application/octet-stream", which is just a binary file. What could it be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dummyman, 2017-05-08
@myspace

xlsx is a compressed xml whose dtd can be specifically identified
and xls has no markup structure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question