FromMediaType

FileType.FromMediaType method

Maps file media type to file type e.g. ‘application/pdf’ will be mapped to PDF.

public static FileType FromMediaType(string mediaType)
Parameter Type Description
mediaType String File media type e.g. application/pdf.

Return Value

Returns corresponding media type when found, otherwise returns default Unknown file type.

See Also