module documentation
Add endpoints for static files to the underlying FastAPI server.
| Function | add |
Add a single file to the root of the FastAPI app. |
| Function | add |
Add the static files responsible for the webapp app to the FastAPI app. |
| Function | check |
Check that the static dir exists and contains expected files and dirs. |
| Constant | NO |
Undocumented |
| Constant | STATIC |
Undocumented |
| Constant | THIS |
Undocumented |
Add a single file to the root of the FastAPI app.
The file with name fname will be mounted at /fname - the folder does not affect where it is mounted in the app.
app: The FastAPI app to add to, in this case the OpenFlexure server fname: the name of the file to add folder: the containing folder of the file
Add the static files responsible for the webapp app to the FastAPI app.
Note that any file in the root of the static dir will not be cached. However, the files in mounted subdirectories are not sent with no-cache headers. The Vue CSS and JS are hashed, so if updated their filename will update. The most important file not to cache is "index.html".
| Parameters | |
app:FastAPI | The FastAPI app to add to, in this case the OpenFlexure server |
scansstr | None | The directory for the scans. |