From 1ebdfa44c814b673679404dfce2982d43edf2069 Mon Sep 17 00:00:00 2001 From: wangsiyuan <2392948297@qq.com> Date: Thu, 28 Dec 2023 19:17:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=20allowed=5Ffiles.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/allowed_files.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 app/utils/allowed_files.py diff --git a/app/utils/allowed_files.py b/app/utils/allowed_files.py new file mode 100644 index 0000000..61ca604 --- /dev/null +++ b/app/utils/allowed_files.py @@ -0,0 +1,2 @@ +def allowed_excel(filename): + return '.' in filename and filename.rsplit('.', 1)[1].lower() in {'xlsx', 'xls'} \ No newline at end of file