mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:26:02 -04:00
More robust handling of the Content-Type header for thumbnail generation (#9788)
Signed-off-by: Sergey Shpikin <rkfg@rkfg.me>
This commit is contained in:
parent
4b965c862d
commit
c9a2b5d402
3 changed files with 5 additions and 0 deletions
|
@ -467,6 +467,9 @@ class MediaRepository:
|
|||
return media_info
|
||||
|
||||
def _get_thumbnail_requirements(self, media_type):
|
||||
scpos = media_type.find(";")
|
||||
if scpos > 0:
|
||||
media_type = media_type[:scpos]
|
||||
return self.thumbnail_requirements.get(media_type, ())
|
||||
|
||||
def _generate_thumbnail(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue