Add support for declaring UploadFile parameters without explicit File() (#4469)

This commit is contained in:
Sebastián Ramírez
2022-01-23 20:14:13 +01:00
committed by GitHub
parent 59b1f353b3
commit 1bf55200a9
16 changed files with 1086 additions and 30 deletions

View File

@@ -9,5 +9,5 @@ async def create_file(file: bytes = File(...)):
@app.post("/uploadfile/")
async def create_upload_file(file: UploadFile = File(...)):
async def create_upload_file(file: UploadFile):
return {"filename": file.filename}