manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karl Wright (JIRA)" <>
Subject [jira] [Commented] (CONNECTORS-1074) Replace ExtensionMimeMap with new Tika().detect(filename)
Date Wed, 15 Oct 2014 11:24:33 GMT


Karl Wright commented on CONNECTORS-1074:

Hi Abe-san,

the RepositoryDocument.setMimeType() method is supposed to describe the binary stream that
you get from RepositoryDocument.getBinaryStream().  Since the output of Tika is always characters,
which the Tika transformer converts to utf-8 bytes, the content type should always be "text/plain;charset=utf-8".

If you want to modify the Tika connector to report what the *original* mime type was in some
other metadata field, that is fine with me, but you should not call setMimeType() because
it will break things.

> Replace ExtensionMimeMap with new Tika().detect(filename)
> ---------------------------------------------------------
>                 Key: CONNECTORS-1074
>                 URL:
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Framework core
>            Reporter: Shinichiro Abe
>             Fix For: ManifoldCF 2.0
> It would be nice if we could support many mime type since ManifoldCF has already been
using Tika.
> {noformat}
>  new Tika().detect(fileName);
> {noformat}
> returns String MimeType. Then we could set this into RepositoryDocument#setMimeType(mimeType)
on each connector;
> Tika reference:
> [javadoc|]
> [test code|]

This message was sent by Atlassian JIRA

View raw message