mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
create download file in system tmp, better error checking (Closes: #487)
This commit is contained in:
parent
01062a16a5
commit
4c64b316db
|
@ -46,7 +46,8 @@ class SeedDMS_Controller_TransmittalDownload extends SeedDMS_Controller_Common {
|
|||
}
|
||||
}
|
||||
|
||||
$filename = tempnam('/tmp', '');
|
||||
$filename = tempnam(sys_get_temp_dir(), 'transmittal-download');
|
||||
if($filename) {
|
||||
$downmgr->createArchive($filename);
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
header("Content-Length: " . filesize($filename));
|
||||
|
@ -56,6 +57,7 @@ class SeedDMS_Controller_TransmittalDownload extends SeedDMS_Controller_Common {
|
|||
|
||||
readfile($filename);
|
||||
unlink($filename);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user