mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 23:09:01 +00:00
Download link for export
This commit is contained in:
10
app.py
10
app.py
@@ -1,4 +1,4 @@
|
||||
from flask import Flask, render_template, redirect, request, flash, abort, Response
|
||||
from flask import Flask, render_template, redirect, request, flash, abort, Response, send_from_directory
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
@@ -41,6 +41,14 @@ def downloads():
|
||||
return render_template("downloads.html", export_file_stats=export_file_stats)
|
||||
|
||||
|
||||
@app.route("/get_export")
|
||||
def get_export():
|
||||
|
||||
if os.path.exists("static/out.csv.xz"):
|
||||
return send_from_directory("static", "out.csv.xz", as_attachment=True, mimetype="application/x-xz")
|
||||
return abort(404)
|
||||
|
||||
|
||||
@app.route("/website/<int:website_id>/")
|
||||
def website_info(website_id):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user