client.py 347 B

12345678910111213
  1. from fastapi import FastAPI
  2. from fastapi.responses import FileResponse
  3. import os
  4. app = FastAPI()
  5. @app.get("/downloadUpdate/{branch}/{version}/{os}/{file}")
  6. async def downloadUpdate(file: str, branch: str,version: str,os: str):
  7. file_path = f'{branch}/{version}/{os}/'
  8. return FileResponse(path=file_path+file, filename=file)