Class ContentType

Represent content type by file name resolver.

Inheritance
System.Object
ContentType
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: Mediachase.FileUploader
Assembly: Mediachase.FileUploader.dll
Version: 10.8.0
Syntax
public static class ContentType
Remarks

Sometime Web Browser doesn't send file content type. ContentType static class uses to resolve content type by file name.

Properties

Default

Gets or sets the default.

Declaration
public static string Default { get; set; }
Property Value
Type Description
System.String

The default.

Methods

Register(String, String)

Registers the specified extension.

Declaration
public static void Register(string Extension, string ContentTypeName)
Parameters
Type Name Description
System.String Extension

The extension.

System.String ContentTypeName

Name of the content type.

Resolve(String)

Resolves the specified Extension.

Declaration
public static string Resolve(string Extension)
Parameters
Type Name Description
System.String Extension

The extension.

Returns
Type Description
System.String

ResolveByPath(String)

Resolves the by path.

Declaration
public static string ResolveByPath(string Path)
Parameters
Type Name Description
System.String Path

The path.

Returns
Type Description
System.String

Unregister(String)

Unregisters the specified extension.

Declaration
public static void Unregister(string Extension)
Parameters
Type Name Description
System.String Extension

The extension.

UnregisterAll()

Unregisters all extensions.

Declaration
public static void UnregisterAll()

Events

ContentTypeResolve

Occurs when a file content type is resolving.

Declaration
public static event ContentTypeResolveEventHandler ContentTypeResolve
Event Type
Type Description
ContentTypeResolveEventHandler