Open yayo opened 1 year ago
上传如果指定"--nosplit"则 nosplit_timeout = split_timeout * N_slice 这里写死为"200"秒造成例如在500KByte/s的线路上传140MByte永远无法完成 改为大约50000(=2GByte/50KByte/s)秒上传2GByte测试通过
--- internal/pcsfunctions/pcsupload/upload.go +++ internal/pcsfunctions/pcsupload/upload.go @@ -60,7 +60,7 @@ func (pu PCSUpload) TmpFile(ctx context.Context, partseq int, partOffset int64, checksum, pcsError := pu.pcs.UploadTmpFile(func(uploadURL string, jar http.CookieJar) (resp http.Response, err error) { //client := pcsconfig.Config.PCSHTTPClient() client.SetCookiejar(jar)
client.SetTimeout(50000 * time.Second)
mr := multipartreader.NewMultipartReader() mr.AddFormFile("uploadedfile", "", r)
上传如果指定"--nosplit"则 nosplit_timeout = split_timeout * N_slice 这里写死为"200"秒造成例如在500KByte/s的线路上传140MByte永远无法完成 改为大约50000(=2GByte/50KByte/s)秒上传2GByte测试通过
--- internal/pcsfunctions/pcsupload/upload.go +++ internal/pcsfunctions/pcsupload/upload.go @@ -60,7 +60,7 @@ func (pu PCSUpload) TmpFile(ctx context.Context, partseq int, partOffset int64, checksum, pcsError := pu.pcs.UploadTmpFile(func(uploadURL string, jar http.CookieJar) (resp http.Response, err error) { //client := pcsconfig.Config.PCSHTTPClient() client.SetCookiejar(jar)
client.SetTimeout(50000 * time.Second)