make use of skipTotal

This commit is contained in:
Gani Georgiev
2023-07-22 18:50:40 +03:00
parent f453cefc0b
commit d1336da339
36 changed files with 171 additions and 157 deletions
+4 -1
View File
@@ -336,7 +336,10 @@ func (s *System) Serve(res http.ResponseWriter, req *http.Request, fileKey strin
}
defer br.Close()
forceAttachment := req.URL.Query().Has(forceAttachmentParam)
var forceAttachment bool
if raw := req.URL.Query().Get(forceAttachmentParam); raw != "" {
forceAttachment, _ = strconv.ParseBool(raw)
}
disposition := "attachment"
realContentType := br.ContentType()