From 2f6ecfe06d6752391768f18555bc50153f90e687 Mon Sep 17 00:00:00 2001 From: retoor Date: Tue, 26 Nov 2024 06:30:47 +0100 Subject: [PATCH] Made upload path dynamic. --- src/rupload/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rupload/app.py b/src/rupload/app.py index 9c94a70..b2b6d54 100644 --- a/src/rupload/app.py +++ b/src/rupload/app.py @@ -287,11 +287,12 @@ def create_app( max_file_size=max_file_size, upload_folder_quota=upload_folder_quota, ) + pathlib.Path(upload_path).mkdir(parents=True, exist_ok=True app.add_routes( [ web.get("/", handle_index), web.post("/upload", handle_upload), - web.static("/uploads", "uploads"), + web.static("/uploads", upload_path), ] ) return app