Welcome Guest, Not a member yet? Register   Sign In
Upload Class orig_name
#1

[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...


Messages In This Thread
Upload Class orig_name - by El Forum - 09-20-2009, 10:10 AM
Upload Class orig_name - by El Forum - 02-19-2010, 01:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB