Update upload.go

This commit is contained in:
ZizzyDizzyMC 2021-02-21 21:21:42 -05:00
parent 0156fdb15b
commit 5ca1a60754
1 changed files with 3 additions and 3 deletions

View File

@ -100,7 +100,7 @@ func uploadPostHandler(c web.C, w http.ResponseWriter, r *http.Request) {
i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64)
if err == nil { if err == nil {
if i > Config.maxSize { if i > Config.maxSize {
upReq.size = i oopsHandler(c, w, r, RespJSON, "Could not upload file: ")
} }
} }
} }
@ -145,7 +145,7 @@ func uploadPutHandler(c web.C, w http.ResponseWriter, r *http.Request) {
i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64)
if err == nil { if err == nil {
if i > Config.maxSize { if i > Config.maxSize {
upReq.size = i oopsHandler(c, w, r, RespJSON, "Could not upload file: ")
} }
} }
} }
@ -227,7 +227,7 @@ func uploadRemote(c web.C, w http.ResponseWriter, r *http.Request) {
i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64)
if err == nil { if err == nil {
if i > Config.maxSize { if i > Config.maxSize {
upReq.size = i oopsHandler(c, w, r, RespJSON, "Could not upload file: ")
} }
} }
} }