I am trying to add a custom mime type to Apache Tika.
I have the following custom-mimetypes.xml
document in org.apache.tika.mime
:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info>
<mime-type type="text/stringtemplategroup">
<glob pattern="*.stg"/>
</mime-type>
<mime-type type="text/stringtemplate">
<glob pattern="*.st"/>
</mime-type>
</mime-info>
I am getting an error about a Conflicting extension pattern .st
:
Caused by: org.apache.tika.mime.MimeTypeException: Conflicting extension pattern: .st
at org.apache.tika.mime.MimeTypesReader.startElement(MimeTypesReader.java:166)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
How do I override the default entry for *.st
extension and have it use my own?
File
object instead of anInputStream
so using on Google App Engine was extremely hard and I had to fork and modify too much stuff to make it less painless. I ended up writing my own magic number classifier for the handful of types I support in my application. Tika is a good idea, terrible implementation. – Decongestant