123456789 |
- from fastapi import FastAPI
- from fastapi.responses import FileResponse
- app = FastAPI()
- @app.get("downloadUpdate/{branch}/{version}/{os}/{file}")
- async def downloadUpdate(file: str, branch: str,version: str,os: str):
- return FileResponse(path=f'{branch}/{version}/{os}/{file.filename}', filename=file.filename, media_type='text/yml')
|