diff --git a/server.py b/server.py index 0afbf19..806e296 100644 --- a/server.py +++ b/server.py @@ -65,7 +65,8 @@ async def create_file(file: Annotated[bytes | None, File()] = None): @app.post("/uploadfile/") async def create_upload_file(file: UploadFile | None, package: Annotated[str, Form()], version: Annotated[str, Form()], - filename: Annotated[str, Form()], stable: Annotated[bool, Form()] | None): + filename: Annotated[str, Form()], stable: Annotated[bool, Form()]): + try: contents = file.file.read() dir_file = "packages/{package}/{version}".format(package=package, version=version)