diff --git a/php/Modules/Album.php b/php/Modules/Album.php index 1754cb0..fef65cf 100644 --- a/php/Modules/Album.php +++ b/php/Modules/Album.php @@ -306,9 +306,14 @@ final class Album { $zip->close(); // Send zip - header("Content-Type: application/zip"); - header("Content-Disposition: attachment; filename=\"$zipTitle.zip\""); - header("Content-Length: " . filesize($filename)); + header("Content-type: application/zip"); + header("Content-disposition: attachment; filename=\"$zipTitle.zip\""); + header("Content-length: " . filesize($filename)); + + // Clean before, in order to avoid 500 error + ob_end_clean(); + flush(); + readfile($filename); // Delete zip @@ -642,4 +647,4 @@ final class Album { } -?> \ No newline at end of file +?>