mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
download billing documents
This commit is contained in:
@@ -51,17 +51,10 @@ class DownloadBookingDocumentLogic
|
||||
exit("Error creating ZIP file");
|
||||
};
|
||||
|
||||
if (file_exists($attachment)) {
|
||||
Storage::download('documents/collections/' . $zip_file);
|
||||
|
||||
header('Content-Type: application/zip');
|
||||
header('Content-disposition: attachment; filename='.$request->input('type').'.zip');
|
||||
header('Content-Length: ' . filesize($attachment));
|
||||
readfile($attachment);
|
||||
} else {
|
||||
exit("Could not find Zip file to download");
|
||||
}
|
||||
File::delete($attachment);
|
||||
|
||||
unlink($attachment);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user