fix: need to use a part number that is 1 indexed based

This commit is contained in:
Derrick Hammer 2024-02-01 19:32:06 -05:00
parent dc9b3b4fda
commit 5456773b81
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -172,6 +172,8 @@ func (r *RenterDefault) MultipartUpload(params MultiPartUploadParams) error {
nextChan := make(chan struct{}, 0)
errChan := make(chan error, 0)
partNumber := int(i + 1)
job := r.cron.RetryableTask(cron.RetryableTaskParams{
Name: fileName + "-part-" + strconv.FormatUint(i, 10),
Function: func() error {
@ -187,7 +189,7 @@ func (r *RenterDefault) MultipartUpload(params MultiPartUploadParams) error {
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 {
return err
}