fix: incorrect content-type of apk files (close #5385)
This commit is contained in:
@ -163,8 +163,15 @@ func GetObjType(filename string, isDir bool) int {
|
||||
return GetFileType(filename)
|
||||
}
|
||||
|
||||
var extraMimeTypes = map[string]string{
|
||||
".apk": "application/vnd.android.package-archive",
|
||||
}
|
||||
|
||||
func GetMimeType(name string) string {
|
||||
ext := path.Ext(name)
|
||||
if m, ok := extraMimeTypes[ext]; ok {
|
||||
return m
|
||||
}
|
||||
m := mime.TypeByExtension(ext)
|
||||
if m != "" {
|
||||
return m
|
||||
|
Reference in New Issue
Block a user