Class WebMediaTypes

Namespace
ProtoTest.Web
Assembly
ProtoTest.Web.dll

Guesses a media type from a downloaded file's extension. It is a guess, never a promise.

public static class WebMediaTypes
Inheritance
WebMediaTypes
Inherited Members

Fields

Default

The media type a file with no known extension gets.

public const string Default = "application/octet-stream"

Field Value

string

Methods

Guess(string)

Returns the media type for fileName's extension, or Default.

public static string Guess(string fileName)

Parameters

fileName string

Returns

string