This commit is contained in:
2023-11-23 23:39:21 +08:00
parent 32daca4458
commit 94c801e96f

View File

@@ -154,8 +154,8 @@ def loginmiya():
@route_api.route("/member/ruilaizi/<filename>",methods = [ "GET" ]) @route_api.route("/member/ruilaizi/<filename>",methods = [ "GET" ])
def ruilaizi(filename): def ruilaizi(filename):
if request.method == "GET": if request.method == "GET":
if os.path.isfile(os.path.join('static', filename)): if os.path.isfile(os.path.join('/static/', filename)):
return send_from_directory('static', filename, as_attachment=True) return send_from_directory('/static/', filename, as_attachment=True)
else: # 如果更新包不存在 else: # 如果更新包不存在
return jsonify({ return jsonify({
'code': 404, 'code': 404,