forked from TrueCloudLab/rclone
b2: fix ChunkWriter size return
This commit is contained in:
parent
bb58040d9c
commit
be17f1523a
1 changed files with 2 additions and 2 deletions
|
@ -241,7 +241,7 @@ func (up *largeUpload) WriteChunk(ctx context.Context, chunkNumber int, reader i
|
||||||
}
|
}
|
||||||
|
|
||||||
in := newHashAppendingReader(reader, sha1.New())
|
in := newHashAppendingReader(reader, sha1.New())
|
||||||
size += int64(in.AdditionalLength())
|
sizeWithHash := size + int64(in.AdditionalLength())
|
||||||
|
|
||||||
// Authorization
|
// Authorization
|
||||||
//
|
//
|
||||||
|
@ -274,7 +274,7 @@ func (up *largeUpload) WriteChunk(ctx context.Context, chunkNumber int, reader i
|
||||||
"X-Bz-Part-Number": fmt.Sprintf("%d", chunkNumber+1),
|
"X-Bz-Part-Number": fmt.Sprintf("%d", chunkNumber+1),
|
||||||
sha1Header: "hex_digits_at_end",
|
sha1Header: "hex_digits_at_end",
|
||||||
},
|
},
|
||||||
ContentLength: &size,
|
ContentLength: &sizeWithHash,
|
||||||
}
|
}
|
||||||
|
|
||||||
var response api.UploadPartResponse
|
var response api.UploadPartResponse
|
||||||
|
|
Loading…
Add table
Reference in a new issue