Dear all,
I am using below code. Then I have images file renamed from gif to bmp or jpg in extension. When I using below code to upload this image file, it will have issues as there is error. If I have not renamed the file extension, it is OK to upload images with correct extension.
I just think that if I rename files from image file extension to another image file extension can be OK. But if I rename bat or csv to images file extension, it is not OK and should not allow if I have configured the correct allowed file type. (not allow bat, csv.....).
Is it possible????
Code:
$config['file_name'] = basename($imgPath);
$config['upload_path'] = $upload_dir;
$config['allowed_types'] = 'gif|jpg|png|bmp|jpeg'; // '*';
$this->upload->initialize($config);
if ( ! $this->upload->do_upload('image'))
{
if($this->upload->display_errors()<>'')
{