Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

fix: IoCallback in WriteMultipart not supported correctly #198

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,11 @@ func (s *Storage) writeMultipart(ctx context.Context, o *Object, r io.Reader, si
err = fmt.Errorf("multipart number limit exceeded: %w", services.ErrRestrictionDissatisfied)
return
}

if opt.HasIoCallback {
r = iowrap.CallbackReader(r, opt.IoCallback)
}

input := &s3.UploadPartInput{
Bucket: &s.name,
// For S3, the `PartNumber` is [1, 10000]. But for users, the `PartNumber` is zero-based.
Expand Down