rogerxavier commited on
Commit
6007ea2
1 Parent(s): cd84989

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +1 -1
api.py CHANGED
@@ -34,7 +34,7 @@ async def getOriginalMangaList(images: List[UploadFile] = File(...)):
34
  for image in images:
35
  img = await image.read()
36
  image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
37
- path_to_image = f"/manga/{idx}.jpg"
38
  image.save(path_to_image)
39
  return "获取图片保存成功"
40
 
 
34
  for image in images:
35
  img = await image.read()
36
  image = Image.open(io.BytesIO(img)).convert("L").convert("RGB")
37
+ path_to_image = f"/manga/{images.index(image)}.jpg"
38
  image.save(path_to_image)
39
  return "获取图片保存成功"
40