Skip to content

Commit

Permalink
set correct mime type for reddit images
Browse files Browse the repository at this point in the history
  • Loading branch information
ggogel committed Feb 17, 2024
1 parent fa1c73b commit 5e664a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion socialmediadownload.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ async def handle_reddit(self, evt, url_tup):

media = await response.read()
uri = await self.client.upload_media(media, mime_type=mime_type, filename=file_name)
await self.client.send_image(evt.room_id, url=uri, file_name=file_name, info=ImageInfo(mimetype='image/jpeg'))
await self.client.send_image(evt.room_id, url=uri, file_name=file_name, info=ImageInfo(mimetype=mime_type))

elif "video" in mime_type and self.config["reddit.video"]:
audio_url = media_url.replace("DASH_720", "DASH_audio")
Expand Down

0 comments on commit 5e664a6

Please sign in to comment.