diff --git a/Helpers/FluentBlobStorage.cs b/Helpers/FluentBlobStorage.cs index d2c929f..deb11f0 100644 --- a/Helpers/FluentBlobStorage.cs +++ b/Helpers/FluentBlobStorage.cs @@ -94,6 +94,20 @@ public FluentBlobStorage WithContentType(string contentType) return (blobClient.Uri, res); } + public async Task<(Uri, Azure.Response)> UploadAsync(string b64) + { + AssertGuards(); + + BlobServiceClient blobServiceClient = new(ConnectionString); + BlobContainerClient containerClient = blobServiceClient.GetBlobContainerClient(ContainerName); + BlobClient blobClient = containerClient.GetBlobClient(FileName); + + var res = await blobClient.UploadAsync(Convert.FromBase64String(b64), Headers); + + return (blobClient.Uri, res); + } + + public (Stream, BlobProperties) OpenRead() { AssertGuards();