summary refs log tree commit diff
path: root/synapse/media
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/media')
-rw-r--r--synapse/media/_base.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/media/_base.py b/synapse/media/_base.py
index 13345acf75..860e5ddca2 100644
--- a/synapse/media/_base.py
+++ b/synapse/media/_base.py
@@ -148,7 +148,9 @@ def add_file_headers(
 
     # A strict subset of content types is allowed to be inlined  so that they may
     # be viewed directly in a browser. Other file types are forced to be downloads.
-    if media_type.lower() in INLINE_CONTENT_TYPES:
+    #
+    # Only the type & subtype are important, parameters can be ignored.
+    if media_type.lower().split(";", 1)[0] in INLINE_CONTENT_TYPES:
         disposition = "inline"
     else:
         disposition = "attachment"