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 |
| The file extension. |
GetExtension()
Returns file extension by MIME type.
All parameters:
Param name | Param type | Description |
---|---|---|
mimeType |
| The MIME type. |
throwIfNotFound |
| The flag indicates the need for an exception if the MIME type is not found. Default value is |
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 |
| The MIME type. |
throwIfNotFound |
| The flag indicates the need for an exception if the MIME type is not found. Default value is |
Last updated