From 0c63bf149c4fc9ea65ef2484765bd31cdd366972 Mon Sep 17 00:00:00 2001 From: sawka Date: Tue, 21 Oct 2025 09:42:37 -0700 Subject: [PATCH] should lowercase ext when looking up in staticmimetypemap --- pkg/util/fileutil/fileutil.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/util/fileutil/fileutil.go b/pkg/util/fileutil/fileutil.go index 426fe1154e..9b958a1aab 100644 --- a/pkg/util/fileutil/fileutil.go +++ b/pkg/util/fileutil/fileutil.go @@ -87,7 +87,7 @@ func DetectMimeType(path string, fileInfo fs.FileInfo, extended bool) string { if fileInfo.Mode()&os.ModeDevice == os.ModeDevice { return "block-special" } - ext := filepath.Ext(path) + ext := strings.ToLower(filepath.Ext(path)) if mimeType, ok := StaticMimeTypeMap[ext]; ok { return mimeType } @@ -136,7 +136,7 @@ func DetectMimeTypeWithDirEnt(path string, dirEnt fs.DirEntry) string { return "block-special" } } - ext := filepath.Ext(path) + ext := strings.ToLower(filepath.Ext(path)) if mimeType, ok := StaticMimeTypeMap[ext]; ok { return mimeType }