Commit 3452e11e authored by Bruce Flynn's avatar Bruce Flynn
Browse files

fix: close file on upload

parent db11c6fb
Pipeline #31618 failed with stage
......@@ -52,6 +52,8 @@ func createUploadHandler(dir string) http.HandlerFunc {
httpFail(w, r, "Could not complete upload", err)
return
}
defer f.Close()
if _, err := io.Copy(f, r.Body); err != nil {
httpFail(w, r, "Could not complete upload", err)
return
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment