Table of Contents

Method GetMimeType

Namespace
Sisk.Core.Http
Assembly
Sisk.Core.dll

GetMimeType(string, string)

Gets the content mime-type from the specified file extension.

public static string GetMimeType(string fileExtension, string defaultMime = "application/octet-stream")

Parameters

fileExtension string

The file extension, with or without the initial dot.

defaultMime string

The default mime-type when the file is not found.

Returns

string

The best matched mime-type, or the default if no mime-type was matched with the specified extension.