From 67ec5753bf5811f1e43e49d9d15b28750984840c Mon Sep 17 00:00:00 2001 From: m Date: Tue, 24 Mar 2026 21:54:07 +0100 Subject: [PATCH] testline --- app.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 6a2839b..c8bac04 100644 --- a/app.py +++ b/app.py @@ -126,7 +126,17 @@ def post_detail(post_id): @app.route('/content/image/') def content_image_files(filename): - return send_from_directory('content/image', filename) + directory = 'content/image' + full_path = os.path.join(os.getcwd(), directory, filename) # Your actual file location + print(f"Requested: {filename}") + print(f"Directory: {os.getcwd()}/{directory}") + print(f"Full path: {full_path}") + print(f"Exists: {os.path.exists(full_path)}") + + if not os.path.exists(full_path): + return f"File not found: {full_path}", 404 + + return send_from_directory(directory, filename) if __name__ == '__main__': app.run(debug=True) \ No newline at end of file