From 10855d554c7e4a0301ad522c37de91647a7d96c2 Mon Sep 17 00:00:00 2001 From: juzeon <812312770@qq.com> Date: Fri, 24 Feb 2023 20:52:08 +0800 Subject: [PATCH] add .txt extension support --- pkg/util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/util/util.go b/pkg/util/util.go index d6787ac..adfbc73 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -8,7 +8,7 @@ import ( func ValidateFilename(filename string) error { switch filepath.Ext(filename) { case ".pdf", ".doc", ".jpg", ".gif", ".png", ".jpeg", - ".docx", ".xls", ".xlsx", ".zip", ".rar", ".7z": + ".docx", ".xls", ".xlsx", ".zip", ".rar", ".7z", ".txt": return nil default: return errors.New("扩展名不支持")