[eluser]Bursh[/eluser]
[quote author="fesweb" date="1219710167"]It depends on what you mean by "before." You
can rename the file without creating a temporary file to be deleted.
Code:
$base_name = 'upload'.$id;
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'pdf|doc';
$config['max_size'] = '2048';
$config['encrypt_name'] = TRUE;
$this->upload->initialize($config);
$this->fileinfo = $this->upload->data();
$base_name_full_path = $this->fileinfo['file_path'].$base_name.$this->fileinfo['file_ext'];
$rename_it = rename($this->fileinfo['full_path'], $base_name_full_path);
Does that do anything for you?[/quote]
Works an absolute charm. Thank you very much.