使用dropzone和codeigniter上传多个文件

I'm working on small project using codeigniter and dropzone my script works fine, my only issue is that codeigniter upload just one file since I select multiple files using dropzone.

This is my PHP code:

$config['upload_path']    = FCPATH.'public/uploads/';
$config['allowed_types']  = 'gif|jpg|png';
$config['overwrite']      = true;
$this->load->library('upload', $config);
$this->upload->initialize($config);

if ( ! $this->upload->do_upload('file'))
{
    print_r($this->upload->display_errors());
}

This is error message that I get:

Message: is_uploaded_file() expects parameter 1 to be string, array given

Your code isn't set up to process multiple files in 1 request. Hence the error as CI doesn't know what to do when $_FILES contains more than 1.

You can resolve this by making sure that the Dropzone settings match your code. Make sure uploadMultiple is false and parallelUploads is 1.