Add route for processing the input file

This commit is contained in:
Alan Orth 2021-03-11 22:42:59 +02:00
parent 207d5af64a
commit 0136d99046
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 22 additions and 1 deletions

View File

@ -27,7 +27,14 @@ def upload_file():
uploaded_file.save(os.path.join(app.config["UPLOAD_PATH"], filename)) 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/<filename>")
def process_file(filename):
return render_template("process.html", cli_version=cli_version, filename=filename)
if __name__ == "__main__": if __name__ == "__main__":

14
templates/process.html Normal file
View File

@ -0,0 +1,14 @@
<!doctype html>
<html lang="en" class="h-100">
{% include 'head.html' %}
<body class="d-flex flex-column h-100">
<main class="flex-shrink-0">
<div class="container">
<h1 class="mt-5 fs-2">DSpace CSV Metadata Quality Checker</h1>
<p>Processing {{ filename }}</p>
</div>
</main>
{% include 'footer.html' %}
</body>
</html>