fix(mime): add fallback mime type

pull/2900/head
Darren Yu 2025-09-14 16:58:45 +08:00
parent 8156db2772
commit e7a3315a59
No known key found for this signature in database
GPG Key ID: 2D69AA5646405984
1 changed files with 7 additions and 1 deletions

View File

@ -36,5 +36,11 @@ func (d *mimeDetector) TypeByName(p string) string {
return m return m
} }
return mime.TypeByExtension(ext) m := mime.TypeByExtension(ext)
if m != "" {
return m
}
// Fallback
return "application/octet-stream"
} }