From 0136d9904670c23b199633a764cc6aefbe05bf95 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 11 Mar 2021 22:42:59 +0200 Subject: [PATCH] Add route for processing the input file --- main.py | 9 ++++++++- templates/process.html | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 templates/process.html diff --git a/main.py b/main.py index 32a8615..93d803a 100644 --- a/main.py +++ b/main.py @@ -27,7 +27,14 @@ def upload_file(): uploaded_file.save(os.path.join(app.config["UPLOAD_PATH"], filename)) - return redirect(url_for("index")) + return redirect(url_for("process_file", filename=filename)) + + return "No file selected" + + +@app.route("/process/") +def process_file(filename): + return render_template("process.html", cli_version=cli_version, filename=filename) if __name__ == "__main__": diff --git a/templates/process.html b/templates/process.html new file mode 100644 index 0000000..7b6b6bb --- /dev/null +++ b/templates/process.html @@ -0,0 +1,14 @@ + + + {% include 'head.html' %} + +
+
+

DSpace CSV Metadata Quality Checker

+

Processing {{ filename }}

+
+
+ + {% include 'footer.html' %} + +