From 196f10c7aa4f98eb72b721d259f8dc3b85085760 Mon Sep 17 00:00:00 2001 From: Harry Hughes <hugheshi@cardiff.ac.uk> Date: Sun, 29 Jan 2023 17:17:12 +0000 Subject: [PATCH] Replace routes.py --- blog/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blog/routes.py b/blog/routes.py index a14298a..049ba45 100644 --- a/blog/routes.py +++ b/blog/routes.py @@ -25,7 +25,7 @@ def cv(): @app.route('/download') def download(): - file_path = os.path.join(os.getcwd(), "blog", "static", "pdf", "cv.pdf") + file_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "static", "pdf", "cv.pdf") return send_file(file_path, as_attachment=True) @app.route("/blog") -- GitLab