aboutsummaryrefslogtreecommitdiff
path: root/go/operation
diff options
context:
space:
mode:
Diffstat (limited to 'go/operation')
-rw-r--r--go/operation/assign_file_id.go3
-rw-r--r--go/operation/submit.go2
2 files changed, 3 insertions, 2 deletions
diff --git a/go/operation/assign_file_id.go b/go/operation/assign_file_id.go
index 672bfa99c..8b6dfe5ba 100644
--- a/go/operation/assign_file_id.go
+++ b/go/operation/assign_file_id.go
@@ -3,6 +3,7 @@ package operation
import (
"encoding/json"
"errors"
+ "fmt"
"net/url"
"strconv"
@@ -38,7 +39,7 @@ func Assign(server string, count int, replication string, collection string, ttl
var ret AssignResult
err = json.Unmarshal(jsonBlob, &ret)
if err != nil {
- return nil, err
+ return nil, fmt.Errorf("JSON unmarshal error:%v, json:%s", err, string(jsonBlob))
}
if ret.Count <= 0 {
return nil, errors.New(ret.Error)
diff --git a/go/operation/submit.go b/go/operation/submit.go
index 03551b1e8..16304d2bd 100644
--- a/go/operation/submit.go
+++ b/go/operation/submit.go
@@ -55,7 +55,7 @@ func SubmitFiles(master string, files []FilePart,
if index > 0 {
file.Fid = file.Fid + "_" + strconv.Itoa(index)
}
- file.Server = ret.PublicUrl
+ file.Server = ret.Url
file.Replication = replication
file.Collection = collection
results[index].Size, err = file.Upload(maxMB, master, secret)