fix: need to pass content type header before ServeContent
This commit is contained in:
parent
c051ef8e44
commit
ad54cc70b3
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue