[eluser]CoffeeBeanDesign[/eluser]
Hi there,
Glad to see file_name added to the latest version of the Upload Class however it seems to mess up the orig_name variable. If you set a file_name the orig_name is changed too.
Line 245 :
Code:
$this->orig_name = $this->file_name;
I think it should come earlier, before the name has been changed :
Somewhere like line 190 :
Code:
// Set the uploaded data as class variables
$this->file_temp = $_FILES[$field]['tmp_name'];
$this->orig_name =$_FILES[$field]['name'];
$this->file_name = $this->_prep_filename($_FILES[$field]['name']);
I'm not 100% sure of the logic of why the orig_name is set afterwards, there may be a perfectly good reason, perhaps I just can't see it yet...