Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ahmed-a-e2006 opened this issue Dec 12, 2022 · 0 comments

Comments

@ahmed-a-e2006
Copy link

ahmed-a-e2006 commented Dec 12, 2022

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

@ahmed-a-e2006 ahmed-a-e2006 changed the title Can't read the exact content type for .xlsx files (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) Can't read the correct content type for .xlsx files (application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant