FileTypeFromMediaType Method
Maps file media type to file type e.g. 'application/pdf' will be mapped to PDF.

Namespace: GroupDocs.Viewer
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 20.6
Syntax
public static FileType FromMediaType(
	string mediaType
)

Parameters

mediaType
Type: SystemString
File media type e.g. application/pdf.

Return Value

Type: FileType
Returns corresponding media type when found, otherwise returns default Unknown file type.
See Also