Skip to content

Updated AWSSDK.S3 to 4.0 #385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/ImageSharp.Web.Providers.AWS/AmazonS3ClientFactory.cs
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ namespace SixLabors.ImageSharp.Web;

internal static class AmazonS3ClientFactory
{
static AmazonS3ClientFactory() => AWSConfigs.InitializeCollections = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Altering global behavior for transitive dependency does not appear be a prudent. It would be more appropriate to update the code to accommodate changes in behavior.


/// <summary>
/// Creates a new bucket under the specified account if a bucket
/// with the same name does not already exist.
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AWSSDK.S3" Version="3.7.103.42" />
<PackageReference Include="AWSSDK.S3" Version="4.0.1.2" />
</ItemGroup>

<ItemGroup>
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ public async Task<ImageMetadata> GetMetaDataAsync()
}
}

return new ImageMetadata(metadata.LastModified, maxAge, metadata.ContentLength);
return new ImageMetadata(metadata.LastModified ?? DateTime.UtcNow, maxAge, metadata.ContentLength);
}

/// <inheritdoc />
Loading
Oops, something went wrong.