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

Graeme Geldenhuys graemeg.lists at gmail.com
Wed May 9 16:37:54 CEST 2012


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. :)

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.

-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net




More information about the Lazarus mailing list