From ef3a3abb9fa74b504cc4f865d8a7e7975e9b965d Mon Sep 17 00:00:00 2001 From: zzh <1368735060@qq.com> Date: Thu, 26 Nov 2026 14:10:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=81=E9=9D=A2=E5=9B=BE=E4=BB=A3?= =?UTF-8?q?=E7=90=86=E5=8E=BB=E6=8E=89=20attachment=EF=BC=8C=E4=BE=BF?= =?UTF-8?q?=E4=BA=8E=20CSS/img=20=E5=86=85=E8=81=94=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/Oms.Application/Shared/OmsManagedImageHelper.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Oms.Application/Shared/OmsManagedImageHelper.cs b/src/Oms.Application/Shared/OmsManagedImageHelper.cs index 4a7b035..6e923f7 100644 --- a/src/Oms.Application/Shared/OmsManagedImageHelper.cs +++ b/src/Oms.Application/Shared/OmsManagedImageHelper.cs @@ -99,10 +99,8 @@ public static class OmsManagedImageHelper continue; } - return new FileContentResult(bytes, GuessImageMime(candidate)) - { - FileDownloadName = Path.GetFileName(candidate.Replace('\\', '/')) - }; + // 不设 FileDownloadName,避免 Content-Disposition: attachment 影响 CSS/img 内联展示 + return new FileContentResult(bytes, GuessImageMime(candidate)); } catch (UnauthorizedAccessException) {