docs/examples/static_files/file_system.py
raw| 1 | from fsspec.implementations.ftp import FTPFileSystem |
| 2 | |
| 3 | from litestar import Litestar |
| 4 | from litestar.static_files import create_static_files_router |
| 5 | |
| 6 | app = Litestar( |
| 7 | route_handlers=[ |
| 8 | create_static_files_router( |
| 9 | path="/static", |
| 10 | directories=["assets"], |
| 11 | file_system=FTPFileSystem(host="127.0.0.1"), |
| 12 | ), |
| 13 | ] |
| 14 | ) |