make use of skipTotal

This commit is contained in:
Gani Georgiev committed 2023-07-22 18:50:40 +03:00
1 parent f453cefc0b
commit d1336da339
36 files changed
+171 -157

No files matched your search

+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()
+1 -1
View File
@@ -305,7 +305,7 @@ func TestFileSystemServe(t *testing.T) {
// png with forced attachment
"image.png",
"test_name_download.png",
map[string]string{"download": "12"},
map[string]string{"download": "1"},
nil,
false,
map[string]string{