mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-22 00:06:02 +01:00
fix (chunked): chunked upload connection close
only close connection when using chunked upload. This is key if you must use something like to work with Cloudflare
This commit is contained in:
parent
de5e2d9583
commit
0dea98d4bd
1 changed files with 1 additions and 1 deletions
|
|
@ -438,7 +438,6 @@ func FileSave(ctx *App, res http.ResponseWriter, req *http.Request) {
|
|||
return
|
||||
}
|
||||
}
|
||||
res.Header().Set("Connection", "Close")
|
||||
|
||||
// There is 2 ways to save something:
|
||||
// - case1: regular upload, we just insert the file in the pipe
|
||||
|
|
@ -461,6 +460,7 @@ func FileSave(ctx *App, res http.ResponseWriter, req *http.Request) {
|
|||
SendErrorResult(res, NewError(err.Error(), 403))
|
||||
}
|
||||
ctx.Session["path"] = path
|
||||
res.Header().Set("Connection", "Close")
|
||||
|
||||
var uploader *chunkedUpload
|
||||
if c := chunkedUploadCache.Get(ctx.Session); c == nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue