Browse Source
Merge pull request #756 from zzoe/patch-1
Update volume_server_handlers_write.go
pull/763/head
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
2 additions and
2 deletions
-
weed/server/volume_server_handlers_write.go
|
|
@ -34,7 +34,7 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
} |
|
|
|
|
|
|
|
ret := operation.UploadResult{} |
|
|
|
size, errorStatus := topology.ReplicatedWrite(vs.GetMaster(), |
|
|
|
_, errorStatus := topology.ReplicatedWrite(vs.GetMaster(), |
|
|
|
vs.store, volumeId, needle, r) |
|
|
|
httpStatus := http.StatusCreated |
|
|
|
if errorStatus != "" { |
|
|
@ -44,7 +44,7 @@ func (vs *VolumeServer) PostHandler(w http.ResponseWriter, r *http.Request) { |
|
|
|
if needle.HasName() { |
|
|
|
ret.Name = string(needle.Name) |
|
|
|
} |
|
|
|
ret.Size = size |
|
|
|
ret.Size = needle.DataSize |
|
|
|
setEtag(w, needle.Etag()) |
|
|
|
writeJsonQuiet(w, r, httpStatus, ret) |
|
|
|
} |
|
|
|