Public Access
Fix route Media FastHTML native
Build and Push Docker Image / build-and-push (push) Successful in 37s
Build and Push Docker Image / build-and-push (push) Successful in 37s
This commit is contained in:
1 parent
d6db532a97
commit
6d509edbb9
1 file changed
+3
-4
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user