Skip to main content
Version: 3.5

MimeTypes

Namespace: Wisej.Core

Assembly: Wisej.Framework (3.5.0.0)

Maps document extensions to content MIME types.

public class MimeTypes

Methods​

Static memberGetMimeType(fileName)​

Returns the MIME mapping for the specified file name.

ParameterTypeDescription
fileNameStringThe file name that is used to determine the MIME type.

Returns: String.

Static memberIsKnownType(extension)​

Returns if the file extension corresponds to a known mime type.

ParameterTypeDescription
extensionStringThe file extension to check.

Returns: Boolean.

Static memberSetMimeType(extension, mimeType)​

Adds or changes the mime type for the specified file extension.

ParameterTypeDescription
extensionStringThe file extension to add to the mime type list.
mimeTypeStringThe mime type to add to the mime type list.