FastAPI · Method
app.mount
Use StaticFiles with app.mount() to serve files from a directory under a URL prefix. The mounted application handles that prefix independently from the main FastAPI app.
Last updated
Syntax
app.mount(path, app, name=None)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
StaticFilesapp.frontend()FastAPIroot_pathAPIRouter