You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Ajesh (Jira)" <ji...@apache.org> on 2022/01/24 05:57:00 UTC

[jira] [Comment Edited] (TIKA-3656) Tika returns wrong content type for docx types.

    [ https://issues.apache.org/jira/browse/TIKA-3656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480825#comment-17480825 ] 

Ajesh edited comment on TIKA-3656 at 1/24/22, 5:56 AM:
-------------------------------------------------------

Calling from java application like below.
{code:java}
String contentType = new Tika().detect(new File(myFile.doc));
{code}
I have only the below dependency in my pom file.
{code:java}
 <dependency>            
    <groupId>org.apache.tika</groupId>            
    <artifactId>tika-core</artifactId>            
    <version>2.2.0</version>        
 </dependency> {code}


was (Author: JIRAUSER283930):
Calling from java application like below.
{code:java}
String contentType = new Tika().detect(new File(myFile.doc));
{code}
I have only below dependency in my pom file.

> Tika returns wrong content type for docx types.
> -----------------------------------------------
>
>                 Key: TIKA-3656
>                 URL: https://issues.apache.org/jira/browse/TIKA-3656
>             Project: Tika
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Windows 10, Java 1.8
>            Reporter: Ajesh
>            Priority: Major
>
> Steps to reproduce
>  # Select a DOCX file say example.docx
>  # Rename the DOCX file to PDF say example.pdf
>  # Use Tika to detect the content type of the example.pdf file
>  # Returns application/zip instead  
> application/vnd.openxmlformats-officedocument.wordprocessingml.document



--
This message was sent by Atlassian Jira
(v8.20.1#820001)