Browse Source

Don't read the file into memory

davidfowl/common-services
David Fowler 1 year ago
committed by Reuben Bond
parent
commit
8debda5c67
1 changed files with 0 additions and 2 deletions
  1. +0
    -2
      src/Services/Catalog/Catalog.API/Controllers/PicController.cs

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

@ -36,8 +36,6 @@ public class PicController : ControllerBase
string imageFileExtension = Path.GetExtension(item.PictureFileName);
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
var buffer = await System.IO.File.ReadAllBytesAsync(path);
return PhysicalFile(path, mimetype);
}


Loading…
Cancel
Save