mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-10-31 15:06:42 +00:00 
			
		
		
		
	🐛 BytesIO cursor 可能不在开头
This commit is contained in:
		| @@ -89,7 +89,7 @@ class MessageSegment(BaseMessageSegment["Message"]): | |||||||
|               proxy: bool = True, |               proxy: bool = True, | ||||||
|               timeout: Optional[int] = None) -> "MessageSegment": |               timeout: Optional[int] = None) -> "MessageSegment": | ||||||
|         if isinstance(file, BytesIO): |         if isinstance(file, BytesIO): | ||||||
|             file = file.read() |             file = file.getvalue() | ||||||
|         if isinstance(file, bytes): |         if isinstance(file, bytes): | ||||||
|             file = f"base64://{b64encode(file).decode()}" |             file = f"base64://{b64encode(file).decode()}" | ||||||
|         elif isinstance(file, Path): |         elif isinstance(file, Path): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user