willbeeler
willbeeler

Reputation: 689

Weird CodeIgniter Upload Problem

Here's the lowdown. PHP, Codeigniter, LAMP.

I've created a fixeee for you all to see my code. http://fixee.org/paste/s8jc04t/

Whenever I have mulitple file uploads (ex. fileupload1, fileupload2, fileupload3, etc.) and I tried to get the upload data from each one correctly, I seem to duplicate the first file data that was uploaded. Can someone help, the fixee explains everything.

Upvotes: 4

Views: 3133

Answers (2)

Tom Schlick
Tom Schlick

Reputation: 2318

put this line before each upload statement.


$this->upload->initialize($config);

that code will reset all config options to the default and then use your configs for the next file without reloading the library over and over.

Upvotes: 10

Teej
Teej

Reputation: 12873

Perhaps you should re-initialize the library. load the config again and initialize the library:

$config['var'] = 'value';
$this->load->library('upload', $config);

Upvotes: 1

Related Questions