fixxed route /configs/path.filename
This commit is contained in:
parent
127754ba15
commit
b87a412bf6
8
app.py
8
app.py
@ -46,6 +46,14 @@ def index():
|
|||||||
configs = load_configs()
|
configs = load_configs()
|
||||||
return render_template('index.html', configs=configs)
|
return render_template('index.html', configs=configs)
|
||||||
|
|
||||||
|
@app.route('/configs/<path:filename>')
|
||||||
|
def serve_config_file(filename):
|
||||||
|
"""Liefert Bilder und Dateien aus dem configs-Ordner aus"""
|
||||||
|
try:
|
||||||
|
return send_from_directory(app.config['CONFIG_DIR'], filename)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Fehler beim Ausliefern von {filename}: {e}")
|
||||||
|
return "Datei nicht gefunden", 404
|
||||||
|
|
||||||
current_config = None
|
current_config = None
|
||||||
current_filename = None
|
current_filename = None
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user