Browse Source

Change ReadAllBytes to ReadAllBytesAsync in PicController (#1425)

pull/1476/head
Zakaria 4 years ago
committed by GitHub
parent
commit
0b4f44659d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Services/Catalog/Catalog.API/Controllers/PicController.cs

+ 1
- 1
src/Services/Catalog/Catalog.API/Controllers/PicController.cs View File

@ -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…
Cancel
Save