Skip to content

Commit ee5b8e5

Browse files
Try setting the property in the factory also
1 parent 4097b19 commit ee5b8e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/ImageSharp.Web.Tests/TestUtilities/AWSS3StorageImageProviderFactory.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ private static async Task InitializeAWSStorageAsync(IServiceProvider services, A
8181
catch
8282
{
8383
IFileInfo file = environment.WebRootFileProvider.GetFileInfo(TestConstants.ImagePath);
84-
using Stream stream = file.CreateReadStream();
84+
await using Stream stream = file.CreateReadStream();
8585

8686
// Set the max-age property so we get coverage for testing in our AWS provider.
8787
CacheControlHeaderValue cacheControl = new()
@@ -100,7 +100,9 @@ private static async Task InitializeAWSStorageAsync(IServiceProvider services, A
100100
CacheControl = cacheControl.ToString()
101101
},
102102
ContentType = " image/png",
103-
InputStream = stream
103+
InputStream = stream,
104+
AutoCloseStream = false,
105+
UseChunkEncoding = false,
104106
};
105107

106108
await amazonS3Client.PutObjectAsync(putRequest);

0 commit comments

Comments
 (0)