From 354714708fbb30a2e8fe80ac661e7822b86240d1 Mon Sep 17 00:00:00 2001 From: ZizzyDizzyMC Date: Sun, 21 Feb 2021 22:12:37 -0500 Subject: [PATCH] Update upload.go --- upload.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upload.go b/upload.go index 768931b..c8105d4 100644 --- a/upload.go +++ b/upload.go @@ -237,9 +237,11 @@ func uploadHeaderProcess(r *http.Request, upReq *UploadRequest) { if r.Header.Get("Linx-Randomize") == "yes" { upReq.randomBarename = true } - upReq.contentSize, err = strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) + contentSize, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) if err != nil { upReq.contentSize = 0 + } else { + upReq.contentSize = contentSize } upReq.deleteKey = r.Header.Get("Linx-Delete-Key") upReq.accessKey = r.Header.Get(accessKeyHeaderName)