From fec48da491362ad18bb78c206c3d0f6d7c49fb38 Mon Sep 17 00:00:00 2001 From: hugcabbage <77980779+hugcabbage@users.noreply.github.com> Date: Sat, 29 Aug 2026 03:46:20 +0000 Subject: [PATCH] fix(drivers/guangyapan): report multipart upload progress to copy task multipartUploadToOSS passed the UpdateProgress callback into stream.NewStreamSectionReader, which ignores the up argument, so the callback was never invoked while uploading parts. As a result, cross-storage copy tasks targeting GuangYaPan stayed at 0% and showed no progress bar or speed in the task list. Fix by tracking the uploaded byte count and invoking up after every part is uploaded, keeping consistent with other drivers' upload flow. --- drivers/guangyapan/util.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/guangyapan/util.go b/drivers/guangyapan/util.go index b8d0cb83d7..40c098edda 100644 --- a/drivers/guangyapan/util.go +++ b/drivers/guangyapan/util.go @@ -241,6 +241,7 @@ func (d *GuangYaPan) multipartUploadToOSS(ctx context.Context, bucket *oss.Bucke } parts := make([]oss.UploadPart, 0, partCount) + var uploaded int64 for i := 0; i < partCount; i++ { if utils.IsCanceled(ctx) { return ctx.Err() @@ -273,6 +274,10 @@ func (d *GuangYaPan) multipartUploadToOSS(ctx context.Context, bucket *oss.Bucke return fmt.Errorf("failed to upload part %d: %w", i+1, err) } parts = append(parts, part) + uploaded += length + if total > 0 { + up(100 * float64(uploaded) / float64(total)) + } } _, err = bucket.CompleteMultipartUpload(imur, parts)