> mouss wrote: >> is there a way to generalize this to other MIME types? I mean a file >> claiming to be a .pdf when it is a .wmv...?
On 26.05.09 02:40, Jonas Eckerman wrote: > You need to check the files contents to catch that, and the ImageInfo > plugin isn't meant to understand just any kind of content. Well, first issue was only to compare file extension to provided mime type, so it would hit .gif file of type image/jpeg >> or do we need a FileType plugin? > > I guess you mist my post where I said that I've got an experimental > plugin that is just that. It compares the content-type with the content > (using File::MimeInfo::Magic (wich uses the freedesktop file database). > > The plugin was called TypeMismatch for a couple of days, wich is closer > to FileType than the current name: MimeMagic. > > Anyway, it can be found at > <http://whatever.frukt.org/spamassassin.text.shtml> that's more complicated but apparently good to have. I wonder if the real filetype will match the extension or the mime type (or neither one) -- Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. "One World. One Web. One Program." - Microsoft promotional advertisement "Ein Volk, ein Reich, ein Fuhrer!" - Adolf Hitler