public function getUploadPath($attribute, $old = false)
{
/** @var BaseActiveRecord $model */
$model = $this->owner;
$path = $this->resolvePath($this->path);
$fileName = $old === true ? $model->getOldAttribute($attribute) : $model->{$attribute};
return $fileName ? Yii::getAlias($path . '/' . $fileName) : null;
}