change count to uint64 to fix #109
fix https://github.com/chrislusf/weed-fs/issues/109
This commit is contained in:
@@ -15,13 +15,13 @@ type AssignResult struct {
|
||||
Fid string `json:"fid,omitempty"`
|
||||
Url string `json:"url,omitempty"`
|
||||
PublicUrl string `json:"publicUrl,omitempty"`
|
||||
Count int `json:"count,omitempty"`
|
||||
Count uint64 `json:"count,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
func Assign(server string, count int, replication string, collection string, ttl string) (*AssignResult, error) {
|
||||
func Assign(server string, count uint64, replication string, collection string, ttl string) (*AssignResult, error) {
|
||||
values := make(url.Values)
|
||||
values.Add("count", strconv.Itoa(count))
|
||||
values.Add("count", strconv.FormatUint(count, 10))
|
||||
if replication != "" {
|
||||
values.Add("replication", replication)
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func SubmitFiles(master string, files []FilePart,
|
||||
for index, file := range files {
|
||||
results[index].FileName = file.FileName
|
||||
}
|
||||
ret, err := Assign(master, len(files), replication, collection, ttl)
|
||||
ret, err := Assign(master, uint64(len(files)), replication, collection, ttl)
|
||||
if err != nil {
|
||||
for index, _ := range files {
|
||||
results[index].Error = err.Error()
|
||||
|
||||
Reference in New Issue
Block a user