From 0505aeaace5b593b0900ea4248b44f9d9e6c28a9 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Wed, 9 Feb 2022 00:16:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8F=96=E6=B6=88=E6=89=80?= =?UTF-8?q?=E6=9C=89=E4=B8=8A=E4=BC=A0=E8=BF=87=E7=9A=84=E5=92=8C=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=98=9F=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebMain.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WebMain.py b/WebMain.py index 8a1a2be..abcaf33 100644 --- a/WebMain.py +++ b/WebMain.py @@ -110,6 +110,13 @@ def insertUpload(): return jsonify({"message": "no filename specific", "code": 400, "status": 1}) +@app.route("/upload/discard", methods=["POST"]) +def discardUpload(): + Common.uploadQueue.empty() + Common.b.clear() + return jsonify({"message": "ok", "code": 200, "status": 0}) + + @app.route("/upload/finish", methods=["POST"]) def finishUpload(): Common.appendOperation("设置当前已完成上传")