Support the download of "bigger-than-memory" backup files.

SVN:trunk[3809]
This commit is contained in:
Denis Flaven
2015-10-26 10:38:57 +00:00
parent d0a0d3c93c
commit e7170755d8

View File

@@ -367,11 +367,14 @@ class DBBackup
*/
public function DownloadBackup($sFile)
{
$oP = new ajax_page('backup');
$oP->SetContentType("multipart/x-zip");
$oP->SetContentDisposition('inline', basename($sFile));
$oP->add(file_get_contents($sFile));
$oP->output();
header('Content-Description: File Transfer');
header('Content-Type: multipart/x-zip');
header('Content-Disposition: inline; filename="'.basename($sFile).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: '.filesize($sFile));
readfile($sFile);
}
/**