mirror of
https://github.com/home-assistant/core.git
synced 2025-07-10 14:57:09 +00:00
Fix telegram bot send_document (#118616)
This commit is contained in:
parent
236b19c5b3
commit
1d1af7ec11
@ -287,7 +287,9 @@ SERVICE_MAP = {
|
|||||||
def _read_file_as_bytesio(file_path: str) -> io.BytesIO:
|
def _read_file_as_bytesio(file_path: str) -> io.BytesIO:
|
||||||
"""Read a file and return it as a BytesIO object."""
|
"""Read a file and return it as a BytesIO object."""
|
||||||
with open(file_path, "rb") as file:
|
with open(file_path, "rb") as file:
|
||||||
return io.BytesIO(file.read())
|
data = io.BytesIO(file.read())
|
||||||
|
data.name = file_path
|
||||||
|
return data
|
||||||
|
|
||||||
|
|
||||||
async def load_data(
|
async def load_data(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user