fix generated video download (#2002)
Fixes out of memory php error when downloading large generated video files
This commit is contained in:
parent
12fc011a29
commit
b6a1885167
|
@ -101,6 +101,9 @@ if ( isset($_REQUEST['downloadIndex']) )
|
||||||
header( "Content-Transfer-Encoding: binary" );
|
header( "Content-Transfer-Encoding: binary" );
|
||||||
header( "Content-Type: application/force-download" );
|
header( "Content-Type: application/force-download" );
|
||||||
header( "Content-Length: ".filesize($videoFiles[$downloadIndex]) );
|
header( "Content-Length: ".filesize($videoFiles[$downloadIndex]) );
|
||||||
|
while ( ob_get_level() > 0 ) {
|
||||||
|
ob_end_clean();
|
||||||
|
}
|
||||||
readfile( $videoFiles[$downloadIndex] );
|
readfile( $videoFiles[$downloadIndex] );
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue