mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Allow image send with read-only access (matrix notify) (#144819)
This commit is contained in:
parent
743abadfcf
commit
1dbe1955eb
@ -475,7 +475,7 @@ class MatrixBot:
|
|||||||
file_stat = await aiofiles.os.stat(image_path)
|
file_stat = await aiofiles.os.stat(image_path)
|
||||||
|
|
||||||
_LOGGER.debug("Uploading file from path, %s", image_path)
|
_LOGGER.debug("Uploading file from path, %s", image_path)
|
||||||
async with aiofiles.open(image_path, "r+b") as image_file:
|
async with aiofiles.open(image_path, "rb") as image_file:
|
||||||
response, _ = await self._client.upload(
|
response, _ = await self._client.upload(
|
||||||
image_file,
|
image_file,
|
||||||
content_type=mime_type,
|
content_type=mime_type,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user