CodeIgniter Upload Library – Fixing Filename Iteration Limitations

I recently uncovered a seemingly undocumented (though reported here and there in forums online) issue with CodeIgniter’s built-in upload library. I’m sure there’s more than one, but the one I encountered was quite annoying…

Basically the core CodeIgniter upload library has a config setting to overwrite existing files of the same name, defaulting to false this forces the newly uploaded filename to have an integer suffix added to it before the file extension, e.g. my_data.csv would become my_data1.csv and so on if the preceding filenames exist. Continue reading CodeIgniter Upload Library – Fixing Filename Iteration Limitations