mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE Passing $tmpFile to extension.
This commit is contained in:
parent
b4ea87a3bf
commit
01c8d38885
@ -210,7 +210,7 @@ class Upload extends Controller {
|
|||||||
$this->file->Name = basename($relativeFilePath);
|
$this->file->Name = basename($relativeFilePath);
|
||||||
$this->file->write();
|
$this->file->write();
|
||||||
$this->file->onAfterUpload();
|
$this->file->onAfterUpload();
|
||||||
$this->extend('onAfterLoad', $this->file); //to allow extensions to e.g. create a version after an upload
|
$this->extend('onAfterLoad', $this->file, $tmpFile); //to allow extensions to e.g. create a version after an upload
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$this->errors[] = _t('File.NOFILESIZE', 'Filesize is zero bytes.');
|
$this->errors[] = _t('File.NOFILESIZE', 'Filesize is zero bytes.');
|
||||||
|
Loading…
Reference in New Issue
Block a user