From b6a1885167c40e67f13f86c4a61216e83c04adcb Mon Sep 17 00:00:00 2001 From: digital-gnome <31593470+digital-gnome@users.noreply.github.com> Date: Sat, 18 Nov 2017 19:02:56 -0500 Subject: [PATCH] fix generated video download (#2002) Fixes out of memory php error when downloading large generated video files --- web/skins/classic/views/video.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/skins/classic/views/video.php b/web/skins/classic/views/video.php index cfbb6f929..6a20ed319 100644 --- a/web/skins/classic/views/video.php +++ b/web/skins/classic/views/video.php @@ -101,6 +101,9 @@ if ( isset($_REQUEST['downloadIndex']) ) header( "Content-Transfer-Encoding: binary" ); header( "Content-Type: application/force-download" ); header( "Content-Length: ".filesize($videoFiles[$downloadIndex]) ); + while ( ob_get_level() > 0 ) { + ob_end_clean(); + } readfile( $videoFiles[$downloadIndex] ); exit; }