Subject: | Error in detecting file-type using tika-core-1.12.jar |
Date: | Tue, 26 Apr 2016 11:16:08 +0000 |
To: | "bug-Apache-Tika-Async [...] rt.cpan.org" <bug-Apache-Tika-Async [...] rt.cpan.org> |
From: | "Bhattacharya, Sumalya (Sumalya)" <bhattachar12 [...] avaya.com> |
Hi,
I have used apache tika using the following dependency in my maven project :
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>1.12</version>
</dependency>
And detecting mime type using the following code :-
InputStream is = new FileInputStream(file);
String mimeType = tika.detect(is);
Most of the use-cases I have tested is yielding correct results except a few :
- Renaming a .jar to a .bin file results in mime type = application/zip
- Renaming a .cer (certificate file) to a .xml(or any other extension) yields mime type = application/octet-stream
Am I missing something? Or in case it is a bug can we have a new version with issues fixed? If so when?
Thanks and Regards,
Sumalya Bhattacharya