redirect issue file upload. - 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: redirect issue file upload. (/showthread.php?tid=64424) |
redirect issue file upload. - wolfgang1983 - 02-17-2016 I can upload multiple images fine on my upload function if comment out my redirect on my upload function. How ever if I enable the redirect it will only upload one for some reason very strange to me. When upload is success full I would like to use redirect('filemanager') Any suggestion and example why the redirect would stop multiple upload. PHP Code: <?php RE: redirect issue file upload. - Diederik - 02-18-2016 You are redirecting from inside your loop. So indeed you get redirected after the first files is procesed. You want to redirect after the loop is finished so you should place it below. RE: redirect issue file upload. - wolfgang1983 - 02-18-2016 (02-18-2016, 01:42 AM)Diederik Wrote: You are redirecting from inside your loop. So indeed you get redirected after the first files is procesed. You want to redirect after the loop is finished so you should place it below. Does this seem better to you PHP Code: <?php RE: redirect issue file upload. - Diederik - 02-18-2016 You would improve it by: PHP Code: if( ! $this->upload->do_upload() ) { |