public async Task DeleteBlob(string fileName) { var blobStore = await CsCtx.GetBlobContainer(BlobContainer); var file = blobStore.GetBlockBlobReference(fileName); await file.DeleteIfExistsAsync(); }
public async Task AddNewStreamFile(Stream entity, string fileName) { var blobStore = await CsCtx.GetBlobContainer(BlobContainer); var file = blobStore.GetBlockBlobReference(fileName); await file.UploadFromStreamAsync(entity); }
public async Task <string> GetStringBlob(string fileName) { var blobStore = await CsCtx.GetBlobContainer(BlobContainer); var file = blobStore.GetBlockBlobReference(fileName); if (await file.ExistsAsync()) { return(await file.DownloadTextAsync()); } return(string.Empty); }