get originalName before move call
This commit is contained in:
parent
06d00f36ba
commit
2ee47f3c69
@ -88,9 +88,9 @@ class FileField extends Form
|
|||||||
throw new FormException('A PHP extension stopped the file upload (UPLOAD_ERR_EXTENSION)');
|
throw new FormException('A PHP extension stopped the file upload (UPLOAD_ERR_EXTENSION)');
|
||||||
case UPLOAD_ERR_OK:
|
case UPLOAD_ERR_OK:
|
||||||
default:
|
default:
|
||||||
|
$data['original_name'] = $data['file']->getName();
|
||||||
$data['file']->move($this->getTmpDir());
|
$data['file']->move($this->getTmpDir());
|
||||||
$data['file']->rename($this->getTmpName($data['token']));
|
$data['file']->rename($this->getTmpName($data['token']));
|
||||||
$data['original_name'] = $data['file']->getName();
|
|
||||||
$data['file'] = '';
|
$data['file'] = '';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user