You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2015/07/21 21:29:06 UTC

[jira] [Comment Edited] (TIKA-1692) Enable getExtension() for texty file types

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

Tim Allison edited comment on TIKA-1692 at 7/21/15 7:29 PM:
------------------------------------------------------------

So the use case is: you've already done file type identification to figure out the MimeType and now you want to save the extension-less file with a human-friendly extension.

The current {{getExtension()}} on MimeTypes that are text/html returns an empty string.  Is this a bug...or did I miss how to do this properly? :)

I have no doubt that I may be reinventing the wheel.

Thank you, [~gagravarr]!


was (Author: tallison@mitre.org):
So the use case is: you've already done file type identification to figure out the MimeType and now you want to save the extension-less file with a human-friendly extension.

> Enable getExtension() for texty file types
> ------------------------------------------
>
>                 Key: TIKA-1692
>                 URL: https://issues.apache.org/jira/browse/TIKA-1692
>             Project: Tika
>          Issue Type: Improvement
>          Components: core
>            Reporter: Tim Allison
>            Priority: Trivial
>             Fix For: 1.10
>
>         Attachments: MimeUtilTest.java
>
>
> {{getExtension()}} offers a handy way to add a "detected" extension from a {{MimeType}} for a file that didn't come with an extension.  However, this functionality doesn't work with texty files: html, xml, css, csv, etc.  
> Let's add a static helper class (or build it into {{MimeType}}?) that will output an extension for all mime types including texty mime types. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)