Download codeigniter file

I am doing the following to upload a file (image) using codeigniter. What I want to do is change the error message so that it is obvious which field is associated with the error, since there are several download options on the page, below is my download code,

$config['upload_path'] = './media/uploads/users';
            $config['allowed_types'] = 'gif|jpg|png';
            $config['max_size'] = '1000';
            $config['max_width']  = '90';
            $config['max_height']  = '60';

            $this->upload->initialize($config);

            if(!$this->upload->do_upload('logo_small'))
            {
                $error = array('error' => $this->upload->display_errors());
                $this->template->build('users/employer', $error);
            }
            else
            {
                $file = $this->upload->data();
                $logo_small = "small_".$file['file_name'];
            }

So, I want the error message to be Small Small, and then, if the error is related to the logo of a large, etc., I would like it to indicate this.

+3
source share
1 answer

The easiest way is to edit the system / language / english / upload_lang.php with the desired error message. enter image description here

+2
source

All Articles