Multi Upload - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Multi Upload (/showthread.php?tid=51453) |
Multi Upload - El Forum - 05-04-2012 [eluser]the_unforgiven[/eluser] Hi guys, I have a function do upload which works great, it uploads and resizes just fine, but now I need to have the ability to upload 3 or 4 images instead of just one image. here's the do upload function: Code: function _do_upload_file() Code: function addproduct(){ Any help, advice code examples highly appreciated. Thanks in advance... Multi Upload - El Forum - 05-04-2012 [eluser]BrokenLegGuy[/eluser] I put all of my file input names into an array and pass it to my upload function. From there I use a foreach loop to process each field. Make sure you have Code: $this->upload->initialize($config); inside your loop or you'll only get the last file as a result. Good luck Multi Upload - El Forum - 05-04-2012 [eluser]the_unforgiven[/eluser] Dont suppose you could show me what you mean i know how loops work but not sure where to put in the code i already have? Multi Upload - El Forum - 05-04-2012 [eluser]BrokenLegGuy[/eluser] I'll post it tonight for you. I just left work and I have a house to work on to get it to qualify for an FHA loan... Multi Upload - El Forum - 05-04-2012 [eluser]the_unforgiven[/eluser] Ok cool, really appreciate it, thanks Multi Upload - El Forum - 05-04-2012 [eluser]BrokenLegGuy[/eluser] Something like this... I found a minute Code: function do_upload($file_fields) Multi Upload - El Forum - 05-04-2012 [eluser]the_unforgiven[/eluser] would that fit in to what i posted in first post then? Multi Upload - El Forum - 05-04-2012 [eluser]BrokenLegGuy[/eluser] with a little massaging, yes. |