isPublic()) { return uploads_path() . '/public/'; } else { return uploads_path() . '/protected/'; } } /** * Define the public address for the storage path. */ public function getPublicDirectory() { $uploadsPath = Config::get('cms.uploadsPath', '/uploads'); if (!preg_match("/(\/\/|http|https)/", $uploadsPath)) { $uploadsPath = Request::getBasePath() . $uploadsPath; } if ($this->isPublic()) { return $uploadsPath . '/public/'; } else { return $uploadsPath . '/protected/'; } } }