Skip to content

Commit

Permalink
🐛 upload raw bytes instead of RawData instance
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt authored Oct 23, 2023
1 parent 47dfc60 commit f29103f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/uniseg/adapters/feishu.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def image(self, seg: Image, bot: Bot) -> "MessageSegment":
else:
raise SerializeFailed(lang.require("nbp-uniseg", "invalid_segment").format(type="image", seg=seg))
data = {"image_type": "message"}
files = {"image": ("file", image)}
files = {"image": ("file", image.raw_bytes)}
params = {"method": "POST", "data": data, "files": files}
result = await bot.call_api("im/v1/images", **params)
file_key = result["image_key"]
Expand Down

0 comments on commit f29103f

Please sign in to comment.