Welcome Guest, Not a member yet? Register   Sign In
File renaming fail on upload
#1

[eluser]Nextneed[/eluser]
Hi, if i upload the same file more than 100 times codeigniter fail to rename it and raise an error.
The problem is in this loop

Code:
$new_filename = '';
for ($i = 1; $i < 100; $i++)
{
    if ( ! file_exists($path.$filename.$i.$this->file_ext))
    {
        $new_filename = $filename.$i.$this->file_ext;
        break;
    }
}

in the upload library...
It could seem a silly problem but if you give to the end user some template files to upload you could have some problems...

bye
Luca
#2

[eluser]InsiteFX[/eluser]
Report as a BUG on the User Voice!

Only quick fix is to change the $i < 100 to $i < 200 etc.

InsiteFX
#3

[eluser]Nextneed[/eluser]
Ok, thanks!
just a doubt... is User Voice the right place to submit bugs? i'm searching but i didn't find any bug report...

Luca
#4

[eluser]InsiteFX[/eluser]
Sorry! To report the BUGS go to the Bitbucket Reactor.

InsiteFX
#5

[eluser]Nextneed[/eluser]
ok, thanks... i've just submitted the bug.. Wink




Theme © iAndrew 2016 - Forum software by © MyBB