Skip to content

Commit

Permalink
fix: Picture.upload_file
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo2011 committed Sep 7, 2024
1 parent 638406b commit 42e0009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bilibili_api/utils/picture.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _write_to_temp_file(self):
open(img_path, "wb").write(self.content)
return img_path

async def upload_file(self, credential: Credential, data: dict = None) -> "Picture":
async def upload_file(self, credential: Credential) -> "Picture":
"""
上传图片至 B 站。
Expand All @@ -160,7 +160,7 @@ async def upload_file(self, credential: Credential, data: dict = None) -> "Pictu
"""
from ..dynamic import upload_image

res = await upload_image(self, credential, data)
res = await upload_image(self, credential)
self.height = res["image_height"]
self.width = res["image_width"]
self.url = res["image_url"]
Expand Down

0 comments on commit 42e0009

Please sign in to comment.