I am encountering a problem with the Codeigniter File Upload class that whenever I try to upload a csv file which is greater than 10MB it says "You did not select a file to upload" but I set already the max size for 20MB and even changed the php.ini file for the upload_max_filesize, memory_limit and the post_max_size but the error is still the same..
Here's the code for the file upload
function upload(){
$config = array(
'upload_path' => './csv_uploads',
'allowed_types' => 'csv',
'max_size' => '20000' // 20MB
);
$filename = "csv_file";
$this->load->library('upload');
$this->upload->initialize($config);
if ( ! $this->upload->do_upload($filename))
{
$data = array('success' => false, 'error' => $this->upload->display_errors());
echo json_encode($data);
}
else
{
$filedata = $this->upload->data();
$data = array(
'success' => true,
);
echo json_encode($data);
}
}
Any help is much appreciated.. Thank you :-)