A simple lookup from file name/extension to MIME/media type, generated from mime-db, which in turn is compiled from IANA, Apache and nginx's MIME types.
It's named GetMimeTypeExtensions (plural) and returns an IEnumerable for a reason. A MIME/media type can map to many extensions. It's impossible for this library to pick one.
when trying to get MimeType in GetMimeTypeExtensions it's shuold rturn string or exciption if not exsits
now it's return IEnumerable
string fileExtension = MimeTypes.GetMimeTypeExtensions(mimeType).SingleOrDefault();
string fileExtension = MimeTypes.GetMimeTypeExtensions(mimeType); , will not compile why need to use SingleOrDefault ?