diff --git a/filetype.go b/filetype.go index 933058c..d53d0fa 100644 --- a/filetype.go +++ b/filetype.go @@ -85,3 +85,12 @@ func IsMIMESupported(mime string) bool { func GetType(ext string) types.Type { return types.Get(ext) } + +func GetTypeByMIME(mime string) types.Type { + for _, kind := range types.Types { + if kind.MIME.Value == mime { + return kind + } + } + return types.Unknown +}