Method FromExtension
FromExtension(string)
Accepts a bare extension, a file name or a full path; matches the last dot-segment, ordinal-ignore-case. Returns "application/octet-stream" for anything unmapped, never null, so a caller can hand the result straight to MediaType.
public static string FromExtension(string fileNameOrExtension)
Parameters
fileNameOrExtensionstring