Udostępnij za pośrednictwem


IMediaTypeProvider.GetMediaType(String) Method

Definition

Returns the media type for the specified file name.

public System.Net.Http.Headers.MediaTypeHeaderValue GetMediaType (string fileName);
abstract member GetMediaType : string -> System.Net.Http.Headers.MediaTypeHeaderValue
Public Function GetMediaType (fileName As String) As MediaTypeHeaderValue

Parameters

fileName
String

The file name to determine the mapping for.

Returns

A new MediaTypeHeaderValue representing the media type for the given file name. If there is no mapping found then a value of application/octet-stream is returned.

Applies to