🚀 Auto-deploy: BrainKP atualizado em 25/07/2026 19:55:59
This commit is contained in:
@@ -549,6 +549,13 @@ def run_backup():
|
||||
except Exception as e:
|
||||
return jsonify({"error": str(e), "trace": traceback.format_exc()}), 500
|
||||
|
||||
@app.route("/api/download/<filename>")
|
||||
def download_file(filename):
|
||||
path = f"/tmp/restore-temp/{filename}"
|
||||
if os.path.exists(path):
|
||||
return send_file(path, as_attachment=True)
|
||||
return "File not found locally", 404
|
||||
|
||||
# ──────────────────────────────────────────────
|
||||
# STATIC & LOGS
|
||||
# ──────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user