* fix(mime): `mimeType` not assigned to new value when is empty * fix(mime): add fallback mime type
This commit is contained in:
@@ -36,5 +36,11 @@ func (d *mimeDetector) TypeByName(p string) string {
|
||||
return m
|
||||
}
|
||||
|
||||
return mime.TypeByExtension(ext)
|
||||
m := mime.TypeByExtension(ext)
|
||||
if m != "" {
|
||||
return m
|
||||
}
|
||||
|
||||
// Fallback
|
||||
return "application/octet-stream"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user