From 3b9cf3b7ea72083254bfd0af40f7d0af2527d8aa Mon Sep 17 00:00:00 2001 From: fredtempez Date: Wed, 26 Dec 2018 20:31:56 +0100 Subject: [PATCH] v9.0.0 : download zip ok !! --- core/module/theme/theme.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/module/theme/theme.php b/core/module/theme/theme.php index 2e2b79d7..eb4c2d8c 100755 --- a/core/module/theme/theme.php +++ b/core/module/theme/theme.php @@ -542,10 +542,13 @@ class theme extends common { } $zip->close(); // Téléchargement du ZIP + + header('Content-Description: File Transfer'); + header('Content-Type: application/octet-stream'); header('Content-Transfer-Encoding: binary'); - header('Content-Disposition: attachment; filename="' . $zipFileName . '"'); - header('Content-Length: ' . filesize('site/tmp/' . $zipFileName)); - readfile('site/tmp/' . $zipFileName); + header('Content-Disposition: attachment; filename="' . $zipFilename . '"'); + header('Content-Length: ' . filesize('site/tmp/' . $zipFilename)); + readfile('site/tmp/' . $zipFilename); // Valeurs en sortie $this->addOutput([ 'display' => self::DISPLAY_RAW