fix cdn server

This commit is contained in:
Kavalar 2023-04-13 12:47:46 +03:00
parent c3bb70d2d5
commit ce805cfba6

View File

@ -65,7 +65,8 @@ async def create_file(file: Annotated[bytes | None, File()] = None):
@app.post("/uploadfile/") @app.post("/uploadfile/")
async def create_upload_file(file: UploadFile | None, package: Annotated[str, Form()], version: Annotated[str, Form()], 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: try:
contents = file.file.read() contents = file.file.read()
dir_file = "packages/{package}/{version}".format(package=package, version=version) dir_file = "packages/{package}/{version}".format(package=package, version=version)