[eluser]saidai jagan[/eluser]
yes...
Do the process in the forloop.
[eluser]rakish[/eluser]
Here is my code and there's still a problem..I need help?
function do_upload()
{
$files = array('userfile_0'=>array('upload_path'=>'./media/uploads/','allowed_types'=>'gif|jpg|png','max_size'=>100),
'userfile_1'=>array('upload_path'=>'./media/uploads/about','allowed_types'=>'gif|jpg|png','max_size'=>100));
$this->load->library('upload');
$res['id'] = 1;
$res['missionimage'] = $_FILES['userfile_0']['name'];
$res['staffimage'] = $_FILES['userfile_1']['name'];
foreach($files as $field=>$settings)
{
$this->upload->initialize($settings);
if ( !$this->upload->do_upload($field))
{
redirect('backend/about/index/tryagain');
}
else
{
$data = array('upload_data' => $this->upload->data());
$this->mabout_content->uploadPhoto($res);
redirect('backend/about/index/imagesaved');
}
}
}
[eluser]Unknown[/eluser]
I'm not sure how good you are with Flash AS3, but it has a FileReferenceList class that allows you to select multiple files and then upload them in a queue to a controller method for processing.
I use this all the time and it works really well, especially when you need to filter file types or check the size of something before you post it to the server. Because its routed through Flash, you also get upload progress data and can display the percent uploaded or create a progress bar.