From 29ea61034a5a878168d0289f6205ae303f7dbbe4 Mon Sep 17 00:00:00 2001 From: guosurui <13012615613@163.com> Date: Mon, 12 Feb 2024 21:15:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=AF=E6=8C=81heic=E5=92=8Cpng?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/util/util.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/util/util.go b/pkg/util/util.go index c28e1b3..33c83f7 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -9,7 +9,9 @@ import ( func ValidateFilename(filename string) error { switch filepath.Ext(strings.ToLower(filename)) { case ".pdf", ".doc", ".jpg", ".gif", ".png", ".jpeg", - ".docx", ".xls", ".xlsx", ".zip", ".rar", ".7z", ".txt": + ".docx", ".xls", ".xlsx", ".zip", ".rar", ".7z", ".txt", + // 支持 iOS 的 HEIC 格式 + ".heic", ".heif", "png": return nil default: return errors.New("扩展名不支持")