blossom: ensure quicktime-format videos get the extension ".mov", not ".moov".

This commit is contained in:
fiatjaf
2026-01-22 23:17:32 -03:00
parent 0cb0d1ccb0
commit 3ed3592e52

View File

@@ -1,6 +1,8 @@
package blossom package blossom
import "mime" import (
"mime"
)
func GetExtension(mimetype string) string { func GetExtension(mimetype string) string {
if mimetype == "" { if mimetype == "" {
@@ -24,6 +26,9 @@ func GetExtension(mimetype string) string {
exts, _ := mime.ExtensionsByType(mimetype) exts, _ := mime.ExtensionsByType(mimetype)
if len(exts) > 0 { if len(exts) > 0 {
if exts[0] == ".moov" {
return ".mov"
}
return exts[0] return exts[0]
} }