mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
check if download file can be created
This commit is contained in:
parent
a736d60df5
commit
8ec772c504
|
@ -46,16 +46,18 @@ class SeedDMS_Controller_TransmittalDownload extends SeedDMS_Controller_Common {
|
|||
}
|
||||
}
|
||||
|
||||
$filename = tempnam(sys_get_temp_dir(), 'transmittal-download');
|
||||
$filename = tempnam(sys_get_temp_dir(), 'transmittal-download-');
|
||||
if($filename) {
|
||||
$downmgr->createArchive($filename);
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header("Content-Length: " . filesize($filename));
|
||||
header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\"");
|
||||
header("Content-Type: application/zip");
|
||||
header("Cache-Control: must-revalidate");
|
||||
if($downmgr->createArchive($filename)) {
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header("Content-Length: " . filesize($filename));
|
||||
header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\"");
|
||||
header("Content-Type: application/zip");
|
||||
header("Cache-Control: must-revalidate");
|
||||
|
||||
readfile($filename);
|
||||
readfile($filename);
|
||||
} else {
|
||||
}
|
||||
unlink($filename);
|
||||
}
|
||||
exit;
|
||||
|
|
Loading…
Reference in New Issue
Block a user