Skip to content

Commit

Permalink
update ces-kms
Browse files Browse the repository at this point in the history
  • Loading branch information
jojoliang committed May 14, 2021
1 parent 7134982 commit 3094fa7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto/crypto_object_part.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ func (s *CryptoObjectService) InitiateMultipartUpload(ctx context.Context, name
opt.XOptionHeader.Add(COSClientSideEncryptionUnencryptedContentMD5, opt.ContentMD5)
opt.ContentMD5 = ""
}
opt.XOptionHeader.Add(COSClientSideEncryptionUnencryptedContentLength, strconv.FormatInt(cryptoCtx.DataSize, 10))
if cryptoCtx.DataSize > 0 {
opt.XOptionHeader.Add(COSClientSideEncryptionDataSize, strconv.FormatInt(cryptoCtx.DataSize, 10))
}
opt.XOptionHeader.Add(COSClientSideEncryptionPartSize, strconv.FormatInt(cryptoCtx.PartSize, 10))
addCryptoHeaders(opt.XOptionHeader, contentCipher.GetCipherData())

return s.ObjectService.InitiateMultipartUpload(ctx, name, opt)
Expand Down

0 comments on commit 3094fa7

Please sign in to comment.