Welcome Guest, Not a member yet? Register   Sign In
codeigniter multiple file upload
#1

[eluser]sico87[/eluser]
Hi there I am using a multiple file upload from http://www.mitesdesign.com/blog/open-sou...de-igniter, I have a problem when using this, when I upload the file it all works fine, until I look at the file extenstions and they are all screwed up, if I upload a PNG and a JPEG, the first file might look like this, image1.png, the second image may look like this though, image2.png.jpg, the as you can see is wrong as the previous files extentions is being appended to the next upload

Has anyone come up agains this before?
#2

[eluser]Craig A Rodway[/eluser]
Open your /system/libraries/Upload.php file. Look around line 935, it should be this (within a small if statement):

Code:
$filename = $this->file_name;

Comment it out.
#3

[eluser]ccb700[/eluser]
You need to initialize the upload object for each uploaded file
#4

[eluser]Unknown[/eluser]
I have the same problem, after i reinitialize the config, the problem solved.
I use this function.

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

//$config is a configuration array.

after that, doing the upload as usual.
#5

[eluser]$ilovephp[/eluser]
[quote author="fork88" date="1273053242"]I have the same problem, after i reinitialize the config, the problem solved.
I use this function.

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

//$config is a configuration array.

after that, doing the upload as usual.[/quote]

i agree. You have to re-initialize the configuration for the Upload class before invoking do_upload function




Theme © iAndrew 2016 - Forum software by © MyBB