Skip to content

Commit bbf7f47

Browse files
committed
Rename bucket to bucketname
1 parent 7ee9e16 commit bbf7f47

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/ImageSharp.Web.Providers.AWS/Caching/AWSS3StorageCache.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Web.Caching.AWS;
1616
public class AWSS3StorageCache : IImageCache
1717
{
1818
private readonly IAmazonS3 amazonS3Client;
19-
private readonly string bucket;
19+
private readonly string bucketName;
2020

2121
/// <summary>
2222
/// Initializes a new instance of the <see cref="AWSS3StorageCache"/> class.
@@ -26,19 +26,19 @@ public AWSS3StorageCache(IOptions<AWSS3StorageCacheOptions> cacheOptions)
2626
{
2727
Guard.NotNull(cacheOptions, nameof(cacheOptions));
2828
AWSS3StorageCacheOptions options = cacheOptions.Value;
29-
this.bucket = options.BucketName;
29+
this.bucketName = options.BucketName;
3030
this.amazonS3Client = AmazonS3ClientFactory.CreateClient(options);
3131
}
3232

3333
/// <inheritdoc/>
3434
public async Task<IImageCacheResolver?> GetAsync(string key)
3535
{
36-
GetObjectMetadataRequest request = new() { BucketName = this.bucket, Key = key };
36+
GetObjectMetadataRequest request = new() { BucketName = this.bucketName, Key = key };
3737
try
3838
{
3939
// HEAD request throws a 404 if not found.
4040
MetadataCollection metadata = (await this.amazonS3Client.GetObjectMetadataAsync(request)).Metadata;
41-
return new AWSS3StorageCacheResolver(this.amazonS3Client, this.bucket!, key, metadata);
41+
return new AWSS3StorageCacheResolver(this.amazonS3Client, this.bucketName, key, metadata);
4242
}
4343
catch
4444
{
@@ -51,7 +51,7 @@ public Task SetAsync(string key, Stream stream, ImageCacheMetadata metadata)
5151
{
5252
PutObjectRequest request = new()
5353
{
54-
BucketName = this.bucket,
54+
BucketName = this.bucketName,
5555
Key = key,
5656
ContentType = metadata.ContentType,
5757
InputStream = stream,

0 commit comments

Comments
 (0)