Skip to content

TFPMimeTypes.AddType

Add a MIME type to the list.

Declaration

Source position: fpmimetypes.pp line 76

public 
procedure TFPMimeTypes.AddType(const AMimeType: string; 
                              const AExtensions: string);

Description

AddType can be used to add AMimeType to the list of known MIME types, and associate a semicolon-separated list of extensions AExtensions with it. If AMimeType is already present in the list of MIME types, then the list of extensions in AExtensions is merged with the existing extensions. The extensions may not have a dot character prepended to them.

See also

Name Description
TFPMimeTypes.GetMimeExtensions Get the extensions associated with a MIME type.
TFPMimeTypes.GetMimeType Get MIME type of an extension.