From 7953f31ff59d06cad1a78800d1e9550332137f37 Mon Sep 17 00:00:00 2001 From: ZizzyDizzyMC Date: Sun, 21 Feb 2021 22:55:51 -0500 Subject: [PATCH] Update upload.go --- upload.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/upload.go b/upload.go index 22a537a..3ba7329 100644 --- a/upload.go +++ b/upload.go @@ -14,7 +14,6 @@ import ( "strconv" "strings" "time" - "log" "github.com/andreimarcu/linx-server/auth/apikeys" "github.com/andreimarcu/linx-server/backends" @@ -95,9 +94,6 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) { upReq.randomBarename = true } upReq.srcIp = r.Header.Get("X-Forwarded-For") - if upReq.contentSize > 0 { - upReq.size = upReq.contentSize - } upload, err := processUpload(upReq) if strings.EqualFold("application/json", r.Header.Get("Accept")) { @@ -133,9 +129,6 @@ func uploadPutHandler(c web.C, w http.ResponseWriter, r *http.Request) { upReq.filename = c.URLParams["name"] upReq.src = http.MaxBytesReader(w, r.Body, Config.maxSize) upReq.srcIp = r.Header.Get("X-Forwarded-For") - if upReq.contentSize > 0 { - upReq.size = upReq.contentSize - } upload, err := processUpload(upReq) if strings.EqualFold("application/json", r.Header.Get("Accept")) {