fix generated video download (#2002)

Fixes out of memory php error when downloading large generated video files
This commit is contained in:
digital-gnome 2017-11-18 19:02:56 -05:00 committed by Isaac Connor
parent 12fc011a29
commit b6a1885167
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}