Skip to content

Can i be able to differentiate between .xlsm and .xlsx files using mmmagic ? #176

@sunder-asuri

Description

@sunder-asuri

i am trying to upload files and as the magic numbers of both .xlsm and .xlsx is same when i try to use this code

  let magic = new Magic(MAGIC_MIME_TYPE);
 magic.detectFile(fileLocation, (err, mimeType) => {
 if (err) throw err;
 console.log(mimeType);

 })
 

here if i upload a .xlsm file i get mime type as application/vnd.openxmlformats-officedocument.spreadsheetml.sheet which is same as for .xlsx file-type where as it should be application/vnd.ms-excel.sheet.macroEnabled.12.
same is the case with .ppsm (getting mime type of .ppsx) and .docm (getting mime type of .docx)

is there a way to identify macro enabled files using this package in any way ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions