Skip to content

Commit

Permalink
Azure blob thumbnail (#243)
Browse files Browse the repository at this point in the history
@Nikhil13x Thanks for contributing
Co-authored-by: Nikhil Scaria <[email protected]>
  • Loading branch information
Nikhil13x authored Mar 27, 2022
1 parent 63c20f8 commit 205cbff
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ protected override async Task DeletePictureThumbs(Picture picture)
/// <returns>Local picture thumb path</returns>
protected override async Task<string> GetThumbPhysicalPath(string thumbFileName)
{
return await Task.FromResult($"{_config.AzureBlobStorageEndPoint}{_config.AzureBlobStorageContainerName}/{thumbFileName}");
var thumbFilePath = $"{_config.AzureBlobStorageEndPoint}{_config.AzureBlobStorageContainerName}/{thumbFileName}";
var blobClient = container.GetBlobClient(thumbFileName);
bool exists = await blobClient.ExistsAsync();
return exists? thumbFilePath : string.Empty;
}

/// <summary>
Expand Down

0 comments on commit 205cbff

Please sign in to comment.