From f29103fa790adee9944d7c31d8b12cd615d2d03b Mon Sep 17 00:00:00 2001 From: StarHeart <starheart233@gmail.com> Date: Mon, 23 Oct 2023 10:05:38 +0800 Subject: [PATCH] :bug: upload raw bytes instead of `RawData` instance --- src/nonebot_plugin_alconna/uniseg/adapters/feishu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py b/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py index 710cd15..186f89e 100644 --- a/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py +++ b/src/nonebot_plugin_alconna/uniseg/adapters/feishu.py @@ -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"]