This commit is contained in:
mikolajpaterka 2023-01-28 21:04:23 +01:00
parent 6799611582
commit 95483a8242

View File

@ -24,6 +24,7 @@ def daj_dane(plik):
app = FastAPI() app = FastAPI()
origins = ["*"] origins = ["*"]
app.add_middleware( app.add_middleware(
@ -34,6 +35,7 @@ app.add_middleware(
allow_headers=["*"], allow_headers=["*"],
) )
@app.post('/invoice') @app.post('/invoice')
async def root(file: UploadFile): async def root(file: UploadFile):
return daj_dane(file.file.read()) return daj_dane(file.file.read())