Change ReadAllBytes to ReadAllBytesAsync in PicController (#1425)
This commit is contained in:
parent
04ab1279d9
commit
0b4f44659d
@ -46,7 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
|
|||||||
string imageFileExtension = Path.GetExtension(item.PictureFileName);
|
string imageFileExtension = Path.GetExtension(item.PictureFileName);
|
||||||
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
|
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
|
||||||
|
|
||||||
var buffer = System.IO.File.ReadAllBytes(path);
|
var buffer = await System.IO.File.ReadAllBytesAsync(path);
|
||||||
|
|
||||||
return File(buffer, mimetype);
|
return File(buffer, mimetype);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user