[eluser]rainfall[/eluser]
I created simple file uploading page. Its upload the files and show its information .
In upload controller
Code:
$data = array('upload_data' => $this->upload->data());
.......
.......
Its contain all the information about the file .
Example : after uploading .......
Your file was successfully uploaded!
file_name: flower.jpg
file_type: image/jpeg
..............
...............
I want to retrieve file_name from upload_data for downloading the file
Here is the download controller i used
Code:
$this->load->helper('download');
$data = file_get_contents(base_url()."uploads/");
// Here is the Problem ????
foreach ($upload_data as $item)
$name=$item['file_name'];
force_download($name, $data);
Download not working . Path is alright but file_name not retrieving properly .
now how can i retrieve ' file_name' from upload_data to $name ????