protected function getScalableUploadPath($defaultName, $absKey, $revKey, $isAbs = false, $createMode = 0775, $model = null) {
        if ($isAbs && isset($this->_data[$absKey])) {
            return $this->_data[$absKey];
        } elseif (!$isAbs && isset($this->_data[$revKey])) {
            return $this->_data[$revKey];
        }

        $folderName = !is_null($model) ? $model->className() : $defaultName;
        $path = $this->getUploadPath(true) . '/' . $folderName;
        if (!@file_exists($path)) {
            if (!@mkdir($path, $createMode, true)) {
                throw new Exception("Cannot create dir: {$path}");
            }
        }
        $this->_data[$absKey] = $path;
        $this->_data[$revKey] = Url::to($this->getUploadPath() . '/' . $folderName);

        return $isAbs ? $this->_data[$absKey] : $this->_data[$revKey];
    }