Remove custom download_file_bytes() function

This commit is contained in:
Tulir Asokan
2018-06-24 00:09:44 +03:00
parent b50558a37d
commit f5c4b477e5
2 changed files with 2 additions and 19 deletions
+2 -2
View File
@@ -115,7 +115,7 @@ async def transfer_thumbnail_to_matrix(client, intent, thumbnail_loc, video, mim
return None
mime_type = "image/png"
else:
file = await client.download_file_bytes(thumbnail_loc)
file = await client.download_file(thumbnail_loc)
width, height = None, None
mime_type = magic.from_buffer(file, mime=True)
@@ -155,7 +155,7 @@ async def _unlocked_transfer_file_to_matrix(db, client, intent, id, location, th
return db_file
try:
file = await client.download_file_bytes(location)
file = await client.download_file(location)
except LocationInvalidError:
return None
except (AuthBytesInvalidError, AuthKeyInvalidError, SecurityError) as e: