From ad54cc70b3983bc702884c1a292b2a64124bafba Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 25 Jan 2024 19:18:35 -0500 Subject: [PATCH] fix: need to pass content type header before ServeContent --- api/s5/http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/s5/http.go b/api/s5/http.go index 8ac650f..57b2fe2 100644 --- a/api/s5/http.go +++ b/api/s5/http.go @@ -1345,6 +1345,8 @@ func (h *HttpHandler) DownloadFile(jc jape.Context) { } }(file) + jc.ResponseWriter.Header().Set("Content-Type", file.Mime()) + http.ServeContent(jc.ResponseWriter, jc.Request, file.Name(), file.Modtime(), file) }