Update upload.go
This commit is contained in:
parent
b61c08ac13
commit
357f1b1883
|
@ -229,8 +229,11 @@ func uploadRemote(c web.C, w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
func uploadHeaderProcess(r *http.Request, upReq *UploadRequest) {
|
func uploadHeaderProcess(r *http.Request, upReq *UploadRequest) {
|
||||||
if len(r.Header.Get("Content-Length")) > 0 {
|
if len(r.Header.Get("Content-Length")) > 0 {
|
||||||
if strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64) > Config.maxSize {
|
i, err := strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64)
|
||||||
upReq.size = strconv.ParseInt(r.Header.Get("Content-Length"), 10, 64)
|
if err = nil {
|
||||||
|
if i > Config.maxSize {
|
||||||
|
upReq.size = i
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if r.Header.Get("Linx-Randomize") == "yes" {
|
if r.Header.Get("Linx-Randomize") == "yes" {
|
||||||
|
|
Loading…
Reference in New Issue