download billing documents

This commit is contained in:
omair saleh
2022-03-02 03:53:59 +08:00
parent be6ebdfde8
commit c98b13efa4
@@ -50,12 +50,12 @@ class DownloadBookingDocumentLogic
$zip->close();
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="'.basename($attachment).'"');
header('Content-Length: ' . filesize($attachment));
flush();
// download zip
readfile($attachment);
// delete file
// delete after download
unlink($attachment);
}