📅  最后修改于: 2022-03-11 14:53:29.274000             🧑  作者: Mango
from fastapi import FastAPI, UploadFile, File
app = FastAPI()
@app.post("/file")
async def upload_file(file: UploadFile = File(...)):
# Do here your stuff with the file
return {"filename": file.filename}