Fix route Media FastHTML native
Build and Push Docker Image / build-and-push (push) Successful in 37s

This commit is contained in:
xavier committed 2026-08-26 20:13:21 +02:00
1 parent d6db532a97
commit 6d509edbb9
1 file changed
+3 -4
+3 -4
View File
@@ -50,10 +50,9 @@ app, rt = fast_app(
app.mount("/Logo", StaticFiles(directory="Logo"), name="Logo")
# --- ROUTE MÉDIA INDESTRUCTIBLE (STARLETTE PUR) ---
@app.route('/Media/{fname:path}')
async def get_media(request):
fname = request.path_params['fname']
# --- ROUTE MÉDIA INDESTRUCTIBLE (SYNTAXE FASHTHTML NATIVE) ---
@rt('/Media/{fname:path}')
def get(fname: str):
chemin = os.path.join(dossier_media, fname)
if os.path.exists(chemin):
try: