From b197322cd8dad1f193a199cbff5524e4b31c792e Mon Sep 17 00:00:00 2001 From: Noah Hsu Date: Wed, 14 Sep 2022 15:14:04 +0800 Subject: [PATCH] fix: type of file with name uppercase --- pkg/utils/file.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/utils/file.go b/pkg/utils/file.go index 37702c42352..614260b4c17 100644 --- a/pkg/utils/file.go +++ b/pkg/utils/file.go @@ -4,6 +4,7 @@ import ( "io" "os" "path/filepath" + "strings" "github.com/alist-org/alist/v3/internal/conf" log "github.com/sirupsen/logrus" @@ -56,7 +57,7 @@ func CreateTempFile(r io.ReadCloser) (*os.File, error) { // GetFileType get file type func GetFileType(filename string) int { - ext := Ext(filename) + ext := strings.ToLower(Ext(filename)) //if SliceContains(conf.TypesMap[conf.OfficeTypes], ext) { // return conf.OFFICE //}