Created
November 24, 2019 21:50
-
-
Save nicolas-2008/4d10dd2fa1a25e3ef2e65c314820fced to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
endpoints.MapGet("/resources/logo.png", async context => | |
{ | |
context.Response.ContentType = "image/png"; | |
using (var fileStream = File.OpenRead("./wwwroot/resources/logo.png")) | |
{ | |
await fileStream.CopyToAsync(context.Response.Body); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment