mirror of https://github.com/cloudreve/Cloudreve
fix(mime): add fallback mime type
parent
8156db2772
commit
e7a3315a59
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue