Skip to content

Commit

Permalink
Don't read the file into memory
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfowl authored and ReubenBond committed May 9, 2023
1 parent 6ad5e8f commit 8debda5
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/Services/Catalog/Catalog.API/Controllers/PicController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ public async Task<ActionResult> GetImageAsync(int catalogItemId)
string imageFileExtension = Path.GetExtension(item.PictureFileName);
string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);

var buffer = await System.IO.File.ReadAllBytesAsync(path);

return PhysicalFile(path, mimetype);
}

Expand Down

0 comments on commit 8debda5

Please sign in to comment.