Skip to content

Can't read the correct content type for .xlsx files (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) #86

@ahmed-a-e2006

Description

@ahmed-a-e2006

When I try to get the content type for the uploaded file test.xlsx, I got wrong content

ContentInfoUtil contentInfoUtil = new ContentInfoUtil();
ContentInfo contentInfo = contentInfoUtil.findMatch("D:/test.xlsx");
System.out.println(contentInfo.getMimeType());
System.out.println(contentInfo.getContentType());

I got this output

application/vnd.openxmlformats-officedocument
MICROSOFT_OFFICE

and it should be

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
MICROSOFT_EXCEL_XML

I attached the excel file that has this problem

Note: I tested it on version 1.16 and 1.17

test.xlsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions