Change ReadAllBytes to ReadAllBytesAsync in PicController (#1425)

This commit is contained in:
Zakaria 2020-09-23 07:45:53 +02:00 committed by GitHub
parent 04ab1279d9
commit 0b4f44659d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
string imageFileExtension = Path.GetExtension(item.PictureFileName);
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
var buffer = System.IO.File.ReadAllBytes(path);
var buffer = await System.IO.File.ReadAllBytesAsync(path);
return File(buffer, mimetype);
}