fix: need to pass content type header before ServeContent

This commit is contained in:
Derrick Hammer 2024-01-25 19:18:35 -05:00
parent c051ef8e44
commit ad54cc70b3
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 0 deletions

View File

@ -1345,6 +1345,8 @@ func (h *HttpHandler) DownloadFile(jc jape.Context) {
} }
}(file) }(file)
jc.ResponseWriter.Header().Set("Content-Type", file.Mime())
http.ServeContent(jc.ResponseWriter, jc.Request, file.Name(), file.Modtime(), file) http.ServeContent(jc.ResponseWriter, jc.Request, file.Name(), file.Modtime(), file)
} }