Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Clarify where media_type comes from.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Jan 19, 2022
1 parent b9a1c66 commit 116015f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions synapse/rest/media/v1/preview_url_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,8 @@ async def _parse_data_url(
# Read back the length that has been written.
length = output_stream.tell()

# urlopen shoves the media-type from the data URL into the content type
# header object.
media_type = url_info.headers.get_content_type()

# Some features are not supported by data: URLs.
Expand Down

0 comments on commit 116015f

Please sign in to comment.