download: prevent buffer/gzip
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/602/head
parent
0aa822c5e4
commit
5e0af5a2e9
|
@ -187,6 +187,11 @@ class DownloadController extends GenericApiController
|
|||
// Make sure the browser downloads the file
|
||||
$out->setHeader('Content-Disposition: attachment; filename="'.$file->getName().'"');
|
||||
|
||||
// Prevent output from being buffered
|
||||
$out->setHeader('Content-Encoding: none');
|
||||
$out->setHeader('X-Content-Encoded-By: none');
|
||||
$out->setHeader('X-Accel-Buffering: no');
|
||||
|
||||
// Open file to send
|
||||
$res = $file->fopen('rb');
|
||||
|
||||
|
|
Loading…
Reference in New Issue