Welcome Guest, Not a member yet? Register   Sign In
Uploading multiple images from posted array
#1

[eluser]Wonder Woman[/eluser]
Hi,

I want to loop through an array to upload images but I can't seem to access the array in my controller...how can i do it so I loop the script to upload...thanks in advance.

view:
Code:
<input type="file" name="userfile[]" id="userfile" class="multi" />

controller:
Code:
$config['upload_path'] = $this->config->item('upload_path');
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = '100';
$this->load->library('upload', $config);
$this->upload->initialize($config);
  
if(!$this->upload->do_upload()) {
   $data['upload_error'] = array('error' => $this->upload->display_errors());
} else {
   $data['upload_success'] = array('upload_data' => $this->upload->data());
   $this->upload_model->upload_gallery($this->upload->file_name);
}


Messages In This Thread
Uploading multiple images from posted array - by El Forum - 03-28-2012, 02:40 AM
Uploading multiple images from posted array - by El Forum - 03-28-2012, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB