From f2b5d7a3140e5daad8ee357a6cc0ca8314e09d16 Mon Sep 17 00:00:00 2001 From: yangjian Date: Wed, 3 Jun 2020 21:09:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=AF=B9=E5=A4=A7=E5=86=99=E5=90=8E=E7=BC=80=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app_doc/util_upload_img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app_doc/util_upload_img.py b/app_doc/util_upload_img.py index e61134f..9b178db 100644 --- a/app_doc/util_upload_img.py +++ b/app_doc/util_upload_img.py @@ -43,7 +43,7 @@ def img_upload(files, dir_name, user): allow_suffix =["jpg", "jpeg", "gif", "png", "bmp", "webp"] file_suffix = files.name.split(".")[-1] # 提取图片格式 # 判断图片格式 - if file_suffix not in allow_suffix: + if file_suffix.lower() not in allow_suffix: return {"success": 0, "message": "图片格式不正确"} relative_path = upload_generation_dir(dir_name)