Hello All,
I have Created Code to generate the CSV File using EExcel View. I can successfully download as wellas save the file on my server, Now What I Want is that, When user downloads CSV File from IPad it gets open in safari, and if he mails the same file, I want to send the download link which is path of the saved CSV Files on my server.
Currently I am getting the link as my url with controller and action.
Please suggest me some solution, Download of CSV on IPadwill also work for me.
Here is the code from EExcelView
if(!$this->filename)
$this->filename = $this->title;
$this->cleanOutput();
$targetPath = Yii::getPathOfAlias('webroot').'/files/';
$objWriter->save($targetPath.$this->filename.'.'.$this->mimeTypes[$this->exportType]['extension']);
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-type: '.$this->mimeTypes[$this->exportType]['Content-type']);
header('Content-Disposition: attachment; filename="'.$this->filename.'.'.$this->mimeTypes[$this->exportType]['extension'].'"');
header('Cache-Control: max-age=0');
$objWriter->save('php://output');
ob_start();
Yii::app()->end();
ob_end_clean();