I'm using mime-util-2.1.3 to check mime types a file. I have noticed that on linux it is unable to correctly detect flv files. The mime type is shown as application/octet-stream, while on windows the mime type is correctly determined as video/x-flv. mp4 videos were detected though. How do I make the application to recognize the flv mime type on Linux ?
问问题
563 次
1 回答
0
尝试用这个初始化:MimeUtil.registerMimeDetector("eu.medsea.mimeutil.detector.MagicMimeMimeDetector"); MimeUtil.registerMimeDetector("eu.medsea.mimeutil.detector.ExtensionMimeDetector");
MimeUtil.registerMimeDetector("eu.medsea.mimeutil.detector.OpendesktopMimeDetector");
我只注册了第一个,MagicMimeMimeDetector。一旦我添加了另外两个,它就开始正常工作了。
于 2012-12-11T19:34:12.160 回答