public function afterSave()
{
if ($this->_file instanceof UploadedFile) {
$path = $this->getUploadPath($this->attribute);
if (is_string($path) && FileHelper::createDirectory(dirname($path))) {
$this->save($this->_file, $path);
$this->afterUpload();
} else {
throw new InvalidParamException("Directory specified in 'path' attribute doesn't exist or cannot be created.");
}
}
}