C-DEngine 5.105

TheCommonUtils..::..GetMimeTypeFromExtension Method

Query for a mime type from a file extension.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static string GetMimeTypeFromExtension(
	string extension
)
Public Shared Function GetMimeTypeFromExtension ( _
	extension As String _
) As String
public:
static String^ GetMimeTypeFromExtension(
	String^ extension
)

Parameters

extension
Type: String
A file extension (include period '.').

Return Value

A valid MIME type. If extension is not found, "application/octet-stream" is returned.

Remarks


Return the standard Multipurpose Internet Mail Extensions (MIME) type from common file name extensions. Example: ".css" returns "text/css".