diff --git a/server/common/proxy.go b/server/common/proxy.go index 8156dc885ef..a4f04abfe2c 100644 --- a/server/common/proxy.go +++ b/server/common/proxy.go @@ -17,6 +17,10 @@ func Proxy(w http.ResponseWriter, r *http.Request, link *model.Link, file model. if link.MFile != nil { defer link.MFile.Close() attachFileName(w, file) + contentType := link.Header.Get("Content-Type") + if contentType != "" { + w.Header().Add("Content-Type", contentType) + } http.ServeContent(w, r, file.GetName(), file.ModTime(), link.MFile) return nil } else if link.RangeReadCloser != nil {