Method
MimeHelper.GetFileExtension
GetFileExtension(string, string?) #
Gets the file extension for the specified MIME type.
public static string? GetFileExtension(string mimeType, string? fallback = null)Parameters #
mimeType string
The MIME type, optionally including parameters such as ; charset=utf-8.
fallback string?
Optional. The default extension when no match is found.
Returns #
The file extension without the leading dot (e.g. html), or fallback if the MIME type is not recognized.