From 44e6d7154faf021c659a8c543f5a2af2377bb330 Mon Sep 17 00:00:00 2001 From: Jon Stovell Date: Mon, 12 Feb 2024 11:55:27 -0700 Subject: [PATCH] Sets Content-Disposition header correctly for mobile browsers Signed-off-by: Jon Stovell --- Sources/ShowAttachments.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ShowAttachments.php b/Sources/ShowAttachments.php index 9644f22ba5..1a0ff2891f 100644 --- a/Sources/ShowAttachments.php +++ b/Sources/ShowAttachments.php @@ -333,7 +333,7 @@ function showAttachment() $utf8name = $_REQUEST['attach'] . ' - ' . $utf8name; // On mobile devices, audio and video should be served inline so the browser can play them. - if (isset($_REQUEST['image']) || (isBrowser('is_mobile') && (strpos($file['mime_type'], 'audio/') !== 0 || strpos($file['mime_type'], 'video/') !== 0))) + if (isset($_REQUEST['image']) || (isBrowser('is_mobile') && (strpos($file['mime_type'], 'audio/') === 0 || strpos($file['mime_type'], 'video/') === 0))) $disposition = 'inline'; else $disposition = 'attachment';