mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
Support the download of "bigger-than-memory" backup files.
SVN:2.2.0[3810]
This commit is contained in:
@@ -367,11 +367,14 @@ class DBBackup
|
|||||||
*/
|
*/
|
||||||
public function DownloadBackup($sFile)
|
public function DownloadBackup($sFile)
|
||||||
{
|
{
|
||||||
$oP = new ajax_page('backup');
|
header('Content-Description: File Transfer');
|
||||||
$oP->SetContentType("multipart/x-zip");
|
header('Content-Type: multipart/x-zip');
|
||||||
$oP->SetContentDisposition('inline', basename($sFile));
|
header('Content-Disposition: inline; filename="'.basename($sFile).'"');
|
||||||
$oP->add(file_get_contents($sFile));
|
header('Expires: 0');
|
||||||
$oP->output();
|
header('Cache-Control: must-revalidate');
|
||||||
|
header('Pragma: public');
|
||||||
|
header('Content-Length: '.filesize($sFile));
|
||||||
|
readfile($sFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user