fix: incorrect content-type of apk files (close #5385)
This commit is contained in:
@ -76,4 +76,5 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model.
|
||||
func attachFileName(w http.ResponseWriter, file model.Obj) {
|
||||
fileName := file.GetName()
|
||||
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"; filename*=UTF-8''%s`, fileName, url.PathEscape(fileName)))
|
||||
w.Header().Set("Content-Type", utils.GetMimeType(fileName))
|
||||
}
|
||||
|
Reference in New Issue
Block a user