From 9bbcebd63f920e3f500ec963aefd87f8b3b3ad79 Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Mon, 7 Oct 2024 17:43:45 +0800 Subject: [PATCH] edited --- backend/app/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/main.py b/backend/app/main.py index bb654ba..2a58415 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -22,10 +22,10 @@ app = FastAPI( ) # app.mount("/static", StaticFiles(directory="static"), name="static") -static_file_abspath = os.path.join(os.path.dirname(__file__), "static") - -app.mount("/static", StaticFiles(directory=static_file_abspath), name="static") +# static_file_abspath = os.path.join(os.path.dirname(__file__), "static") +# app.mount("/static", StaticFiles(directory=static_file_abspath), name="static") +app.mount('/static', StaticFiles(directory=os.path.join(current_dir, 'static')), name='static') # Set all CORS enabled origins if settings.BACKEND_CORS_ORIGINS: app.add_middleware(