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