1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/16863] Support playing video attachments

PHPBB3-16863
This commit is contained in:
3D-I
2021-08-30 21:28:45 +02:00
parent 3dc446d5ce
commit 80f3d7b0aa
10 changed files with 139 additions and 1 deletions

View File

@@ -254,7 +254,8 @@ 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)
if (strpos($attachment['mimetype'], 'image') !== false || strpos($attachment['mimetype'], 'audio') !== false ||
strpos($attachment['mimetype'], 'video') !== false)
{
$disposition = $response->headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_INLINE,