On Fri, Dec 19, 2008 at 1:08 PM, Kurz Wolfgang <[email protected]> wrote: > To store Documents I need to set the MimeType in the Resource Node to do > a search later.
Jackrabbit's simplewebdavservlet simply takes the extension to identify file types. Here is the default configuration: https://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-server/src/main/resources/org/apache/jackrabbit/server/io/mimetypes.properties A more advanced way is to use libraries that look into the file for magic bytes and other identifiers for the filetype, eg. JMimeMagic. Here is a nice overview of options I found on Google: http://www.rgagnon.com/javadetails/java-0487.html > But my problem is where do I get the mime types from and which do I use > if I have more than one option? You can use any one of them ;-) Since all of these mimetypes are valid, you could use the one that works with most of your other applications and operating systems in practice - there is no general authority on which mimetype is the correct one. One could blame Microsoft for that, but it does not really help. Regards, Alex -- Alexander Klimetschek [email protected]
