Interface IMimeTypeRegistry
Handles mapping from a file extension to a MIME type.
Namespace: EPiServer.Web
Assembly: EPiServer.Framework.dll
Version: 11.20.7Syntax
public interface IMimeTypeRegistry
Methods
Add(String, String)
Registers a MIME type to an file extension.
Declaration
void Add(string extension, string mimeType)
Parameters
Type | Name | Description |
---|---|---|
System.String | extension | The file extension that the MIME type should be associated with. |
System.String | mimeType | The MIME type that should be associated with the file extension. |
Clear()
Removes all MIME mappings from the IMimeTypeRegistry.
Declaration
void Clear()
Get(String)
Gets the MIME type registered to the provided file extension.
Declaration
string Get(string extension)
Parameters
Type | Name | Description |
---|---|---|
System.String | extension | The file extension to get the MIME type for. |
Returns
Type | Description |
---|---|
System.String | The MIME type associated with the extension or null if not found. |
Remove(String)
Removes a MIME mapping from the IMimeTypeRegistry.
Declaration
void Remove(string extension)
Parameters
Type | Name | Description |
---|---|---|
System.String | extension | The file extension whos MIME mapping should be removed. |