HI,

> On 12 Nov 2018, at 16:35, Christian Wolf <[email protected]> wrote:
> 
> 
> I would like to override a file extension already registered in the 
> tika-mimetypes.xml file. 
> 
> I know that the custom-mimetypes.xml file allows to register new custom 
> mimetypes and it works well for new file extenstions (glob pattern) that do 
> not already exist in tika-mimetypes.xml.
> 
> Lets take the following entry in tika-mimetypes.xml:
> 
>   <mime-type type="application/x-dtbresource+xml">
>     <glob pattern="*.res"/>
>   </mime-type>
> 
> What should I do to override the existing mime-type value to return  
> "application/my-specific-resource" instead of "application/x-dtbresource+xml" 
> ?
> 

We would not normally recommend overriding existing mime-types but if you have 
to do it you can copy tika-mimetypes.xml and then place it at the front of your 
classpath in the package/folder org.apache.tika.mime, this will then override 
the default. 

Cheers,
Dave



Reply via email to