From a2b8ad715fb4908a7abc6c25cc872faaf3764160 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 15 Aug 2021 14:42:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=96=87=E4=BB=B6=E5=90=8D?= =?UTF-8?q?=E7=B2=BE=E7=A1=AE=E5=88=B0=E5=BE=AE=E7=A7=92=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=90=8C=E4=B8=80=E7=A7=92=E5=B9=B6=E5=8F=91=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=AF=BC=E8=87=B4=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E9=87=8D=E5=A4=8D?= 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 febc09f..f276701 100644 --- a/app_doc/util_upload_img.py +++ b/app_doc/util_upload_img.py @@ -241,7 +241,7 @@ def base_img_upload(files,dir_name, user): files_base = base64.b64decode(files_str) # 进行base64编码 relative_path = upload_generation_dir(dir_name) - file_name = str(datetime.datetime.today()).replace(':', '').replace(' ', '_').split('.')[0] + extensionName # 日期时间 + file_name = str(datetime.datetime.today()).replace(':', '').replace(' ', '_').replace('.', '_') + extensionName # 日期时间 path_file = os.path.join(relative_path, file_name) path_file = settings.MEDIA_ROOT + path_file # print('文件路径:', path_file)