mongosoft\file\UploadBehavior::getUploadPath PHP Method

getUploadPath() public method

Returns file path for the attribute.
public getUploadPath ( string $attribute, boolean $old = false ) : string | null
$attribute string
$old boolean
return string | null the file path.
    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;
    }