jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: Mime Types
Date Fri, 19 Dec 2008 13:27:56 GMT
On Fri, Dec 19, 2008 at 1:08 PM, Kurz Wolfgang <wolfgang.kurz@gwvs.de> 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
alexander.klimetschek@day.com

Mime
View raw message