How do I change the name of files that go to a particular directory? This is my code;
$upload_files = $_FILES['files'];
// Inicia o array dos dados que serão inseridos
$conf2 = array();
// Varre o array com info. dos arquivos
for ($i=0; $i < sizeof($upload_files); $i++) {
// Nome do arquivo em cada elemento
$new_name = $upload_files[$i]['name'];
//Configure upload.
$conf2[] = array(
"file_name" => $new_name,
"upload_path" => './public/uploads/album/'. $past_date .'/'. $pasta .'/',
"allowed_types" => "mp3",
"max_size" => "2194304000"
);
$this->upload->initialize($conf2);
}
I'm using the class CodeIgniter-Multi-Upload