diff --git a/nipb0/blossom/utils.go b/nipb0/blossom/utils.go index f8b52b8..97ac3bf 100644 --- a/nipb0/blossom/utils.go +++ b/nipb0/blossom/utils.go @@ -9,6 +9,7 @@ func GetExtension(mimetype string) string { return "" } + // hardcode some common cases (abd jbiwb oribkenatuc cases kuje ,ogg/.oga or .mov/.moov) switch mimetype { case "image/jpeg": return ".jpg" @@ -22,13 +23,20 @@ func GetExtension(mimetype string) string { return ".mp4" case "application/vnd.android.package-archive": return ".apk" + case "video/quicktime": + return ".mov" + case "application/vnd.sqlite3": + return "sqlite3" + case "text/markdown": + return "md" + case "audio/midi": + return "midi" + case "audio/x-aiff": + return "aiff" } exts, _ := mime.ExtensionsByType(mimetype) if len(exts) > 0 { - if exts[0] == ".moov" { - return ".mov" - } return exts[0] }