Upload Multiple image - 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: Upload Multiple image (/showthread.php?tid=54485) |
Upload Multiple image - El Forum - 09-11-2012 [eluser]KaMiii[/eluser] Hi everyone, i'm new to the codeigniter fóruns, I need some help uploading multiple files.. I would like to do an upload form with information and with image upload Since this is for products the images must be uploaded to the right place.. localhost/app/produtos/produtos_ins?a=50 I'm passing the variable through the url so i can "know" where to save in the database, but i'm getting really trouble with the upload, because i wanted to upload multiple images with the progress bar and i also wanted to save the filename and description in the database.. Need some help here, Regards. Upload Multiple image - El Forum - 09-11-2012 [eluser]Bias Tegaralaga[/eluser] try javascript library, plupload for example. Upload Multiple image - El Forum - 09-11-2012 [eluser]KaMiii[/eluser] I've made some progress, got a small doubt, how do i save the file with the temp_name instead of the file name ? $_FILES['userfile']['name'] = $value['name'][$s]; $_FILES['userfile']['type'] = $value['type'][$s]; $_FILES['userfile']['tmp_name'] = $value['tmp_name'][$s]; $_FILES['userfile']['error'] = $value['error'][$s]; $_FILES['userfile']['size'] = $value['size'][$s]; $config['upload_path'] = './uploads/produtos/'; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $config['max_size'] = '300'; $config['max_width'] = '1000'; $config['max_height'] = '1000'; $this->load->library('upload', $config); $this->upload->do_upload(); $data = $this->upload->data(); Upload Multiple image - El Forum - 09-11-2012 [eluser]KaMiii[/eluser] Got all the stuff working, just want to save the images with the tmp_name, don't want to original name file, plus i'm missing i want to know how to validate the uploaded imagens, check if the size is < than the size in my config, plus the width and the heigh.. Regards. Upload Multiple image - El Forum - 09-12-2012 [eluser]KaMiii[/eluser] Found it, just missing the validation on the image, need some help here... Regards. |