[eluser]GabrieleMartino[/eluser]
Hello,
my controller state
public function download_file(){
$this->load->helper('download');
$path = './uploads/'.$this->session->userdata('chat_id').'/files';
$path_complete = $path.'/';
$handle = opendir($path_complete);
$files = glob($path_complete.'*'); // get all file names
foreach($files as $file){ // iterate files
if(is_file($file)
{
$data = file_get_contents($file); // Read the file's contents
$name = $file;
force_download($name, $data);
}
}
}
I tried to downloadimages and files. Do not work (corrupted and incomplete).
Thanks