I have AWS instance with Ubuntu and PHP configured. Every things work perfect. Only file upload not working. Application developed in PHP [codeigniter]
$this->load->library('form_validation');
$config = [
'upload_path' => "./data/user-avatar",
'allowed_types' => 'gif|jpg|png|jpeg|JPEG',
'encrypt_name' => TRUE
];
$this->load->library('upload',$config);
if($this->upload->do_upload())
{
$data = $this->upload->data();
echo $image = $data['file_name'];
} else {
echo "I am here in else";
}
It executive else block directly. Application work fine on local.
- Checked upload dir permission its 777
- Check on phpinfo file upload is on
Any help to find of the error will be appreciated.
Thanks Prashant