I am creating a number of reports that I display in the browser. This one, for example, downloads some Excel workbooks to the users PC. I have decided that I also want to save the reports in S3, for later encryption and download.
Can I change ))->toBrowser($this->session->userdata('campaign') . "_workbook.xlsx"); to ALSO create a file (on the server) at the same time?
public function audit()
{
$title = sprintf("Audit Workbook for %s", $this->session->userdata('campaign'));
$description = sprintf("paramaters used by Research Study Online to build for %s", $this->session->userdata('campaign'));
$report = new MyExportExcel;
// $report->run()->exportToExcel()->toBrowser($this->session->userdata('campaign') . "_workbook.xlsx");
$report->run()->exportToExcel(array(
"properties" => array(
"creator" => "Research Study Online",
"title" => $title,
"description" => $description,
"subject" => "Audit Workpapers",
"keywords" => "",
"category" => "",
)
))->toBrowser($this->session->userdata('campaign') . "_workbook.xlsx");
}