fix duplicated file id list entries when uploading large file
This commit is contained in:
@@ -112,11 +112,8 @@ func (fi FilePart) upload(server string, fid string, maxMB int, master, replicat
|
|||||||
}
|
}
|
||||||
fids = append(fids, id)
|
fids = append(fids, id)
|
||||||
retSize += count
|
retSize += count
|
||||||
if e = upload_file_id_list(fileUrl, fi.FileName+"-list", fids); e != nil {
|
|
||||||
return 0, e
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return retSize, nil
|
err = upload_file_id_list(fileUrl, fi.FileName+"-list", fids)
|
||||||
} else {
|
} else {
|
||||||
ret, e := Upload(fileUrl, fi.FileName, fi.Reader, fi.IsGzipped, fi.MimeType)
|
ret, e := Upload(fileUrl, fi.FileName, fi.Reader, fi.IsGzipped, fi.MimeType)
|
||||||
if e != nil {
|
if e != nil {
|
||||||
@@ -124,7 +121,7 @@ func (fi FilePart) upload(server string, fid string, maxMB int, master, replicat
|
|||||||
}
|
}
|
||||||
return ret.Size, e
|
return ret.Size, e
|
||||||
}
|
}
|
||||||
return 0, nil
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func upload_one_chunk(filename string, reader io.Reader, master, replication string) (fid string, size int, e error) {
|
func upload_one_chunk(filename string, reader io.Reader, master, replication string) (fid string, size int, e error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user