Internet Direct (Indy)
Home
PreviousUpNext
TIdMimeTable.GetDefaultFileExt Method
Pascal
function GetDefaultFileExt(
    const MIMEType: string
): string;
Parameters 
Description 
MIMEType 
The MIME type and subtype to examine. 

String - The file extension for the MIME type, or ''.

GetDefaultFileExt is a String function used to retrieve the file extension for the case-insensitive registered MIME type specified in MIMEType. GetDefaultFileExt will call BuildCache if the value in MIMEType is not already present in the MIME type mapping table. 

The return value for GetDefaultFileExt will contain the file extension, including the '.' character, associate dwith the MIME type in MIMEType. The return value for the method can be an empty string ('') when the value in MIMEType cannot be found in the MIME type mapping after checking the cached values. 

Use AddMimeType to add a new file extension to MIME type mapping to the table. 

Use GetFileMIMEType to retrieve the MIME type for a specified file name and file extension.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.