Downloading album : clean and flush before send zip file to avoid 500 error.
This commit is contained in:
parent
27f207dcba
commit
3037e5c3ac
@ -306,9 +306,14 @@ final class Album {
|
|||||||
$zip->close();
|
$zip->close();
|
||||||
|
|
||||||
// Send zip
|
// Send zip
|
||||||
header("Content-Type: application/zip");
|
header("Content-type: application/zip");
|
||||||
header("Content-Disposition: attachment; filename=\"$zipTitle.zip\"");
|
header("Content-disposition: attachment; filename=\"$zipTitle.zip\"");
|
||||||
header("Content-Length: " . filesize($filename));
|
header("Content-length: " . filesize($filename));
|
||||||
|
|
||||||
|
// Clean before, in order to avoid 500 error
|
||||||
|
ob_end_clean();
|
||||||
|
flush();
|
||||||
|
|
||||||
readfile($filename);
|
readfile($filename);
|
||||||
|
|
||||||
// Delete zip
|
// Delete zip
|
||||||
@ -642,4 +647,4 @@ final class Album {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user