![]() |
You did not select a file to upload. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: You did not select a file to upload. (/showthread.php?tid=68051) |
You did not select a file to upload. - Ali - 05-17-2017 Hello when i don't select any file for upload i will get that error! i don't want file uploading be require field! how to disable ? PHP Code: public function reply() RE: You did not select a file to upload. - InsiteFX - 05-17-2017 Check your $error_msg_reply if it is equal to ( 'upload_no_file_selected' ) That is the error message returned, use an if else statement to check for it. RE: You did not select a file to upload. - Rufnex - 05-17-2017 You can make a condition check like: Code: if ($this->upload->do_upload('userfile')) RE: You did not select a file to upload. - ivantcholakov - 05-17-2017 I use this detection of whether a file is going to be uploaded, it always works: Code: $field = 'userfile'; // The name attribute of the file input control. |