make use of skipTotal
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user