[ticket/16863] Support playing video attachments

PHPBB3-16863
This commit is contained in:
3D-I 2021-08-30 22:01:51 +02:00
parent 90d92ffdff
commit 8726a6a3cb

View file

@ -254,8 +254,10 @@ class attachment extends controller
$response->headers->set('Content-Type', $attachment['mimetype']);
// Display images in browser and force download for other file types
if (strpos($attachment['mimetype'], 'image') !== false || strpos($attachment['mimetype'], 'audio') !== false ||
strpos($attachment['mimetype'], 'video') !== false)
if (strpos($attachment['mimetype'], 'image') !== false
|| strpos($attachment['mimetype'], 'audio') !== false
|| strpos($attachment['mimetype'], 'video') !== false
)
{
$disposition = $response->headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_INLINE,