Merge pull request #5076 from flamytwista/patch-2

FEATURE Passing $tmpFile to extension.
This commit is contained in:
Damian Mooyman 2016-02-23 09:52:39 +13:00
commit 2e037881b6

View File

@ -210,7 +210,7 @@ class Upload extends Controller {
$this->file->Name = basename($relativeFilePath);
$this->file->write();
$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;
} else {
$this->errors[] = _t('File.NOFILESIZE', 'Filesize is zero bytes.');