![]() |
Why does uploading images fail in this application? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17) +--- Thread: Why does uploading images fail in this application? (/showthread.php?tid=77457) |
Why does uploading images fail in this application? - Ajax30 - 09-03-2020 I am working on a Social Network application with Codeigniter 3, Ioan-Auth and Bootstrap 4. More details HERE. The code below correctly hashes the filename before inserting it in the avatar column, but the upload itself never happens. Code: if ($this->form_validation->run() === TRUE) I have a XAMPP server on Windows 10, so it is unlikely that there are permission issues on the images folder. RE: Why does uploading images fail in this application? - InsiteFX - 09-03-2020 Maybe because your missing the ending forward slash / on the upload_path? RE: Why does uploading images fail in this application? - Ajax30 - 09-03-2020 I wish it was that. It is not. RE: Why does uploading images fail in this application? - demyr - 09-03-2020 Have you tried checking each suitable points ? For example, after your upload path line you can : PHP Code: $config['upload_path'] = './assets/img/avatars'; So that you can see the results of each code block. By the way, $this->load->library part did not work for me as well and I used it as below in one of my projects: PHP Code: //$this->load->library('upload', $config); instead of this, use below RE: Why does uploading images fail in this application? - Ajax30 - 09-03-2020 (09-03-2020, 12:03 PM)demyr Wrote: Have you tried checking each suitable points ? For example, after your upload path line you can : Nice, but how do I load the upload library then? RE: Why does uploading images fail in this application? - InsiteFX - 09-04-2020 PHP Code: // You could also autoload it |