Class MimeMapping

Handles mapping from an extension to a mime type.

Inheritance
System.Object
MimeMapping
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web
Assembly: EPiServer.Framework.dll
Version: 8.11.0
Syntax
public static class MimeMapping

Methods

AddMimeMapping(String, String)

Adds a MIME type to the mimemapping table

Declaration
public static void AddMimeMapping(string extension, string mimeType)
Parameters
Type Name Description
System.String extension

The extension.

System.String mimeType

Type of the MIME.

ClearMimeMappings()

Removes all MIME mappings from the mapping table.

Declaration
public static void ClearMimeMappings()

GetMimeMapping(String)

Gets the mime type based on the extension of a file name.

Declaration
public static string GetMimeMapping(string fileName)
Parameters
Type Name Description
System.String fileName

The file name.

Returns
Type Description
System.String

RemoveMimeMapping(String)

Removes a MIME mapping from the mapping table.

Declaration
public static void RemoveMimeMapping(string extension)
Parameters
Type Name Description
System.String extension

The extension.