File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -201,11 +201,11 @@ export class Upload extends EventEmitter {
201201
202202 private async __createMultipartUpload ( ) : Promise < CreateMultipartUploadCommandOutput > {
203203 if ( ! this . createMultiPartPromise ) {
204- const createCommandParams = {
205- ChecksumAlgorithm : ChecksumAlgorithm . CRC32 ,
206- ... this . params ,
207- Body : undefined ,
208- } ;
204+ const createCommandParams = { ... this . params , Body : undefined } ;
205+ const requestChecksumCalculation = await this . client . config . requestChecksumCalculation ( ) ;
206+ if ( requestChecksumCalculation === "WHEN_SUPPORTED" ) {
207+ createCommandParams . ChecksumAlgorithm = ChecksumAlgorithm . CRC32 ;
208+ }
209209 this . createMultiPartPromise = this . client
210210 . send ( new CreateMultipartUploadCommand ( createCommandParams ) )
211211 . then ( ( createMpuResponse ) => {
You can’t perform that action at this time.
0 commit comments