Mount scans to app on startup

This commit is contained in:
jaknapper 2025-05-15 18:02:43 +01:00 committed by Julian Stirling
parent b88487af78
commit efe2127afb

View file

@ -44,3 +44,10 @@ def add_static_files(app: FastAPI) -> None:
StaticFiles(directory=fpath),
name=f"static_{fname}",
)
# Mount the scan directory to .../scans/, to allow dzi viewing
app.mount(
"/scans/",
StaticFiles(directory="/var/openflexure/scans/"),
name="scans",
)