public function getZippedTranslations($group = null) { // disable gzip compression of this page, this causes wrapping of the zip file in gzip format // does not work the zip is still gzip compressed if (ini_get('zlib.output_compression')) { ini_set('zlib.output_compression', 'Off'); \Log::info("after turning off zlib.compression current setting " . ini_get('zlib.output_compression')); } $file = $this->manager->zipTranslations($group); if ($group && $group !== '*') { $zip_name = "Translations_{$group}_"; // Zip name } else { $zip_name = "Translations_"; // Zip name } header('Content-Type: application/zip'); header('Content-Length: ' . filesize($file)); header('Content-Disposition: attachment; filename="' . $zip_name . date('Ymd-His') . '.zip"'); header('Content-Transfer-Encoding: binary'); ob_clean(); flush(); readfile($file); unlink($file); \Log::info("sending file, zlib.compression current setting " . ini_get('zlib.output_compression')); }
public function getZippedTranslations($group = null) { $file = $this->manager->zipTranslations($group); header('Content-Type: application/zip'); header('Content-Length: ' . filesize($file)); header('Content-Disposition: attachment; filename="Translations_' . date('Ymd-His') . '.zip"'); ob_clean(); flush(); readfile($file); unlink($file); }