mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-25 15:18:36 -05:00
11 lines
217 B
Python
11 lines
217 B
Python
from fastapi import FastAPI
|
|
from fastapi.responses import FileResponse
|
|
|
|
some_file_path = "large-video-file.mp4"
|
|
app = FastAPI()
|
|
|
|
|
|
@app.get("/", response_class=FileResponse)
|
|
async def main():
|
|
return some_file_path
|