Package DE_EPAGES::Core::API::MimeTypes
@EXPORT_OK |
Functions
GetMimeTypeByExtension
Returns the mimetype for a given extension. The extension is not case- sensitive and can have a leading dot (for compatibility with fsplit and some others).
Syntax |
my $MimeType = GetMimeTypeByExtension( $Extension); |
Example |
GetMimeTypeByExtension('mp3'); # audio/mpeg |
Input |
|
Return |
|
GetMimeTypeByFileName
Returns the mimetype for a given file name. The extension is not case- sensitive.
Syntax |
my $MimeType = GetMimeTypeByFileName( $FileName ); |
Example |
GetMimeTypeByExtension('/some/path/to/my/file.mp3'); # audio/mpeg |
Input |
|
Return |
|