3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ string content
138
138
Key = objectKey ,
139
139
UploadId = uploadId ,
140
140
PartNumber = partNumber ,
141
- InputStream = memoryStream
141
+ InputStream = memoryStream ,
142
142
} ;
143
143
144
144
var response = await s3Client . UploadPartAsync ( uploadRequest ) ;
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ private static async Task Main(string[] args)
18
18
19
19
private static AmazonS3Client GetAmazonS3Client ( )
20
20
{
21
+ // Fixes localstack breaking change in AWSSSDK.S3 versions 3.7.412.0 and above.
22
+ // https://github.com/aws/aws-sdk-net/issues/3610
23
+ Environment . SetEnvironmentVariable ( "AWS_REQUEST_CHECKSUM_CALCULATION" , "WHEN_REQUIRED" ) ;
24
+
21
25
if ( Environment . GetEnvironmentVariable ( "AWS_ACCESSKEY" ) is string accessKey &&
22
26
Environment . GetEnvironmentVariable ( "AWS_SECRETKEY" ) is string secretKey &&
23
27
Environment . GetEnvironmentVariable ( "AWS_REGION" ) is string region )
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ string content
141
141
Key = objectKey ,
142
142
UploadId = uploadId ,
143
143
PartNumber = partNumber ,
144
- InputStream = memoryStream
144
+ InputStream = memoryStream ,
145
145
} ;
146
146
147
147
var response = s3Client . UploadPart ( request ) ;
0 commit comments