get originalName before move call

This commit is contained in:
Aurelijus 2011-03-24 10:39:42 +02:00
parent 06d00f36ba
commit 2ee47f3c69

View File

@ -88,9 +88,9 @@ class FileField extends Form
throw new FormException('A PHP extension stopped the file upload (UPLOAD_ERR_EXTENSION)');
case UPLOAD_ERR_OK:
default:
$data['original_name'] = $data['file']->getName();
$data['file']->move($this->getTmpDir());
$data['file']->rename($this->getTmpName($data['token']));
$data['original_name'] = $data['file']->getName();
$data['file'] = '';
break;
}