fix: need to use a part number that is 1 indexed based
This commit is contained in:
parent
dc9b3b4fda
commit
5456773b81
|
@ -172,6 +172,8 @@ func (r *RenterDefault) MultipartUpload(params MultiPartUploadParams) error {
|
||||||
nextChan := make(chan struct{}, 0)
|
nextChan := make(chan struct{}, 0)
|
||||||
errChan := make(chan error, 0)
|
errChan := make(chan error, 0)
|
||||||
|
|
||||||
|
partNumber := int(i + 1)
|
||||||
|
|
||||||
job := r.cron.RetryableTask(cron.RetryableTaskParams{
|
job := r.cron.RetryableTask(cron.RetryableTaskParams{
|
||||||
Name: fileName + "-part-" + strconv.FormatUint(i, 10),
|
Name: fileName + "-part-" + strconv.FormatUint(i, 10),
|
||||||
Function: func() error {
|
Function: func() error {
|
||||||
|
@ -187,7 +189,7 @@ func (r *RenterDefault) MultipartUpload(params MultiPartUploadParams) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = r.workerClient.UploadMultipartUploadPart(context.Background(), reader, bucket, fileName, upload.UploadID, int(i), api.UploadMultipartUploadPartOptions{})
|
_, err = r.workerClient.UploadMultipartUploadPart(context.Background(), reader, bucket, fileName, upload.UploadID, partNumber, api.UploadMultipartUploadPartOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue