Chris Lu
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
0 deletions
-
weed/operation/upload_content.go
|
@ -92,6 +92,12 @@ func upload_content(uploadUrl string, fillBufferFunction func(w io.Writer) error |
|
|
return nil, post_err |
|
|
return nil, post_err |
|
|
} |
|
|
} |
|
|
defer resp.Body.Close() |
|
|
defer resp.Body.Close() |
|
|
|
|
|
|
|
|
|
|
|
if resp.StatusCode < http.StatusOK || |
|
|
|
|
|
resp.StatusCode > http.StatusIMUsed { |
|
|
|
|
|
return nil, errors.New(http.StatusText(resp.StatusCode)) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
etag := getEtag(resp) |
|
|
etag := getEtag(resp) |
|
|
resp_body, ra_err := ioutil.ReadAll(resp.Body) |
|
|
resp_body, ra_err := ioutil.ReadAll(resp.Body) |
|
|
if ra_err != nil { |
|
|
if ra_err != nil { |
|
|