mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-12 17:27:27 +02:00
make use of skipTotal
This commit is contained in:
1 parent
f453cefc0b
commit
d1336da339
36 files changed
+171
-157
No files matched your search
@@ -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