MimeTypeHelper
MimeTypeHelper
class provides methods for getting a file extension (starts with dot, e.g. ".pdf") by a MIME type and vice versa.
GetMimeType()
Returns MIME type by file extension.
All parameters:
Param name
Param type
Description
extension
string
The file extension.
GetExtension()
Returns file extension by MIME type.
All parameters:
Param name
Param type
Description
mimeType
string
The MIME type.
throwIfNotFound
bool
The flag indicates the need for an exception if the MIME type is not found. Default value is true
.
GetExtensions()
Returns file extensions by MIME type. Some MIME types has any various of extensions. For example:
All parameters:
Param name
Param type
Description
mimeType
string
The MIME type.
throwIfNotFound
bool
The flag indicates the need for an exception if the MIME type is not found. Default value is true
.
Last updated