You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Nick Burch (JIRA)" <ji...@apache.org> on 2015/02/03 12:11:34 UTC
[jira] [Commented] (TIKA-1538) Wrong mimetype detection
[ https://issues.apache.org/jira/browse/TIKA-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14303089#comment-14303089 ]
Nick Burch commented on TIKA-1538:
----------------------------------
I've just tried with {{java -jar tika-app-1.7.jar < Product345037-000.jpg}}
That does a detection without the help of the filename, and returns {{image/jpeg}} as expected
Could you try a newer version of Tika?
> Wrong mimetype detection
> ------------------------
>
> Key: TIKA-1538
> URL: https://issues.apache.org/jira/browse/TIKA-1538
> Project: Tika
> Issue Type: Bug
> Affects Versions: 1.7
> Reporter: Miguel
> Attachments: Product345037-000.jpg
>
>
> [SCENARIO]
> - Working on a "supposed to be a valid JPEG file" (the file is attached to this issue report), which is correctly detected and treated by a browser, etc. (Detection works well for almost all other checked images).
> - Using tika-app-1.7.jar
> - Java code snippet:
> Tika tikaObject = new Tika();
> ...
> // image is a byte[] containing the JPEG file
> String contentTypeTika = tikaObject.detect( image );
> [RESULT]
> detected mimetype is "application/gzip" ("application/x-gzip" if using tika-app-1.4.jar or tika-app-1.5.jar)
> [EXPECTED]
> "image/jpeg"
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)