Joël Royer created TIKA-1164:
--------------------------------
Summary: InputStream get modified by content type detection
Key: TIKA-1164
URL: https://issues.apache.org/jira/browse/TIKA-1164
Project: Tika
Issue Type: Bug
Affects Versions: 1.4
Environment: Windows 7 / Eclipse Kepler / Tomcat 7 / JavaSE 7
Reporter: Joël Royer
Priority: Blocker
I'm using Tika for content type detection after file upload.
After tika detection, file content is modified (not the same size compared to
original uploaded file).
Here is my code:
{code}
AutoDetectParser parser = new AutoDetectParser();
Detector detector = parser.getDetector();
Metadata md = new Metadata();
md.add(Metadata.RESOURCE_NAME_KEY, nom);
md.add(Metadata.CONTENT_TYPE, typeMime);
MediaType type = detector.detect(new BufferedInputStream(is), md);
{code}
Before detection, file size is correct.
After detection, file size is lower than original.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira