[Lazarus] Function to get the mimetype from a file extension
wkitty42 at windstream.net
Wed May 9 14:46:25 CEST 2012
On 5/9/2012 07:39, Felipe Monteiro de Carvalho wrote:
> I need this now and after some Googling I couldn't find anything. So I
> was wondering, maybe we already have this somewhere in FPC or Lazarus?
> If not it might be something to consider adding to LazUtils.
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
into the file to determine its format/type will open it with the proper tool
instead of bringing it up in the app indicated by the extension...
More information about the Lazarus