(picture:UploadFile=File(...), brand:str=Form(...), model:str=Form(...))
| 5 | |
| 6 | @app.post("/upload") |
| 7 | async def upload(picture:UploadFile=File(...), brand:str=Form(...), model:str=Form(...)): |
| 8 | |
| 9 | with open("saved_file.png", "wb") as buffer: |
| 10 | shutil.copyfileobj(picture.file, buffer) |
| 11 | return { |
| 12 | "brand": brand, |
| 13 | "model": model, |
| 14 | "file_name":picture.filename |
| 15 | } |
nothing calls this directly
no outgoing calls
no test coverage detected