I have documentation. Form-data names have dots.
This code doesn't work:
from fastapi import FastAPI, File, UploadFile
app = FastAPI()
@app.post('/test')
async def test(anpr: UploadFile = File(...),
licensePlatePicture: UploadFile = File(...),
detectionPicture: UploadFile = File(...)
):
''''''
return None
Question: What if we have form-data name with a dot?
You can add aliases to your file fields like this:
@app.post('/test')
async def test(anpr: UploadFile = File(..., alias='anpr.xml'),
licensePlatePicture: UploadFile = File(..., alias='licensePlatePicture.jpg'),
detectionPicture: UploadFile = File(..., alias='detectionPicture.jpg')
):