Skip to content

Commit eadeef6

Browse files
Merge branch 'main' into js/auth-utils
2 parents b875731 + 0a62c3b commit eadeef6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ImageSharp.Web.Providers.AWS/Providers/AWSS3StorageImageProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ private async Task<bool> KeyExists(IAmazonS3 s3Client, string bucketName, string
161161
return false;
162162
}
163163

164+
// If the object exists but the client is not authorized to access it, then a "Forbidden" will be thrown.
165+
if (string.Equals(e.ErrorCode, "Forbidden"))
166+
{
167+
return false;
168+
}
169+
164170
throw;
165171
}
166172
}

0 commit comments

Comments
 (0)