[Lazarus] Function to get the mimetype from a file extension

waldo kitty wkitty42 at windstream.net
Wed May 9 18:52:51 CEST 2012

On 5/9/2012 10:37, Graeme Geldenhuys wrote:
> On 9 May 2012 14:46, waldo kitty<wkitty42 at windstream.net>  wrote:
>> wouldn't it be better to use mimemagic instead of relying on the file's
>> extension?
>> i can easily name foo.gif as foo.txt and those systems that do properly look
> +1
> Windows and Mac OS X fails that test. Linux rules in that regards. :)

yeah, i remember when we were playing with this back when fidonet was in its 
heyday... many in the programming echos were looking at this for their tools and 
apps they were writing :)

> Side note:
> Sad thing is, I believe Mac OS 9 and earlier used to use mimemagic,
> but with OS X they simply look at the file extension - dumb move.

definitely a dumb move... especially when tricks like using the wrong extension 
are used in malware, trojan and virus attacks...

More information about the Lazarus mailing list