Skip to content

Commit

Permalink
Update changes
Browse files Browse the repository at this point in the history
  • Loading branch information
atir-naveed-geeksltd committed Jan 27, 2025
1 parent 5745433 commit 4cd5622
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Olive.Blob.Azure/AzureBlobStorageProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,24 @@ public async Task DeleteAsync(Blob document)
}
}

public async Task DeleteAsync(Blob document, string key)
{
if (document.IsEmpty()) return;

var blobContainer = await GetBlobContainer();
key = key.Or(document.GetKey());

try
{
await blobContainer.DeleteBlobAsync(document.GetKey());
}
catch (Exception ex)
{
Log.Error(ex, $"Failed to delete document with {key} key on Azure");
throw;
}
}

public byte[] ToByte(Stream input)
{
using (MemoryStream ms = new MemoryStream())
Expand Down
2 changes: 1 addition & 1 deletion Olive.Blob.Azure/Olive.Blob.Azure.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>3.1.118</Version>
<Version>3.1.119</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 4cd5622

Please sign in to comment.