forked from home-assistant/core
Fix telegram bot send_document (#118616)
This commit is contained in:
committed by
Paulus Schoutsen
parent
236b19c5b3
commit
1d1af7ec11
@@ -287,7 +287,9 @@ SERVICE_MAP = {
|
||||
def _read_file_as_bytesio(file_path: str) -> io.BytesIO:
|
||||
"""Read a file and return it as a BytesIO object."""
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user