Skip to content

mimetype

mime2ext

mime2ext = ( mimetype: string )

Converts a MIME type to its corresponding file extension.

Parameters

Name Type Description
mimetype any The MIME type to convert.

Returns: The file extension corresponding to the given MIME type.


ext

ext = ( str: string )

Extracts the file extension from a given string.

Parameters

Name Type Description
str any The input string.

Returns: The file extension.


ext2mime

ext2mime = ( ext: string )

Converts a file extension to a MIME type.

Parameters

Name Type Description
ext any The

Returns: The corresponding MIME type for the given extension.