Internet Direct (Indy) Version 9.0.2 Beta
TIdMimeTable.GetFileMIMEType
Returns the MIME type for a file name.

function GetFileMIMEType(const AFileName: string): string;
Parameters
const AFileName: string
The file name to be examined.

Returns
String - The registered MIME type for the file name.

Description
GetFileMIMEType is a String function used to retrieve the registered MIME type for the file name specified in Filename. GetFileMIMEType examines the currently cached MIME types, but calls BuildCache is no registered MIME type exists in the cache for the specified file. If no MIME type is found after reloading the cache, the value "application/octet-stream" is used as the MIME type for the file.