TwentyTwenty.Storage.Amazon.AmazonStorageProvider.DeleteBlobAsync C# (CSharp) Method

DeleteBlobAsync() public method

public DeleteBlobAsync ( string containerName, string blobName ) : System.Threading.Tasks.Task
containerName string
blobName string
return System.Threading.Tasks.Task
        public async Task DeleteBlobAsync(string containerName, string blobName)
        {
            var key = GenerateKeyName(containerName, blobName);

            var objectDeleteRequest = new DeleteObjectRequest()
            {
                BucketName = _bucket,
                Key = key
            };

            try
            {
                await _s3Client.DeleteObjectAsync(objectDeleteRequest);
            }
            catch (AmazonS3Exception asex)
            {
                throw asex.ToStorageException();
            }
        }