From 4e5c84e416e28b12476b53473e73626a1eb76e31 Mon Sep 17 00:00:00 2001 From: clive Date: Sun, 10 Nov 2024 15:14:26 +1100 Subject: [PATCH] Commit: allow images. --- Program.cs | 4 ++++ Views/Shared/_Layout.cshtml | 1 + 2 files changed, 5 insertions(+) diff --git a/Program.cs b/Program.cs index b480d28..3b13d7f 100644 --- a/Program.cs +++ b/Program.cs @@ -42,6 +42,10 @@ app.UseStaticFiles(new StaticFileOptions { ctx.Context.Response.ContentType = "image/x-icon"; } + else if (path.EndsWith(".jpg") || path.EndsWith(".jpeg")) + { + ctx.Context.Response.ContentType = "image/jpeg"; + } } }); diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index a4196f9..a04e3fb 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -13,6 +13,7 @@ +