From b258ee330ce9d4aa001b9743fde0a76fd9431241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Mon, 8 Aug 2022 09:58:32 +0800 Subject: [PATCH] =?UTF-8?q?apk=E4=B8=8A=E4=BC=A0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/system/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/system/views.py b/apps/system/views.py index 80bf647f..d8425819 100755 --- a/apps/system/views.py +++ b/apps/system/views.py @@ -600,4 +600,9 @@ class ApkView(MyLoggingMixin, ListCreateAPIView): config.set("apk", "version", vdata['version']) config.set("apk", "file", vdata['file']) config.write(open(os.path.join(settings.BASE_DIR, 'server/conf.ini'), 'w')) + from shutil import copyfile + try: + copyfile(settings.BASE_DIR + vdata['file'], settings.BASE_DIR + '/media/qyjy_ehs.apk') + except Exception: + pass return Response()