You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to detect *.msg (outlook) files? I'm getting x-ole-storage instead of vnd.ms-outlook, as returned by Tika, for example. This is my code:
mimeTypeDetector.detectMimeType("filename", new ByteArrayInputStream(fileContent));
My msg file starts with D0 CF 11 E0 A1 B1 1A E1.
The text was updated successfully, but these errors were encountered:
The vnd.ms-outlook format is non-standard -- so non-standard that we at Overview use it for something else (PST files). We implemented ours in extra-mime-info.xml.
To mimic Tika (which detects PST as vnd.ms-outlook-pst), we'd need to change overview-serverandmime-types, in lockstep. It's painful.
I think I prefer a different route: let users supply their own mime.cache with whatever types they want. This repo could track shared-mime-info exactly, so there wouldn't be such rigmarole next time. We'd need a small API change (a new ctor for MimeTypeDetector) and a big HOWTO guide.
@glazzari Are you willing to take on the task of tweaking the API and adding a HOWTO? We'd need a new public MimeTypeDetector(InputStream mimeCache) constructor; the default constructor would become MimeTypeDetector(getClass().getResourceAsStream(MimeCache)) and we'd need a unit test with a non-standard mime.cache and a non-standard file (maybe .msg). The HOWTO should guide users on editing extra-mime-info.xml and re-running ./rebuild-mime-cache.sh. The existing <mime-type> in extra-mime-info.xml should be commented out -- it could serve as an example.
Is there a way to detect *.msg (outlook) files? I'm getting x-ole-storage instead of vnd.ms-outlook, as returned by Tika, for example. This is my code:
mimeTypeDetector.detectMimeType("filename", new ByteArrayInputStream(fileContent));
My msg file starts with
D0 CF 11 E0 A1 B1 1A E1
.The text was updated successfully, but these errors were encountered: