diff --git a/CHANGELOG.md b/CHANGELOG.md index d5af34b6c..484b2caf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +* **Build 199** (2015-02-19) + - The **/uploads** directory has been moved to **/storage/app/uploads** to make way for CDN support. This directory should be moved on the file system and the config (`cms.uploadsPath`) updated. + * **Build 192** (2015-02-14) - For security reasons a vague error message is shown when a user tries to sign in unsuccessfully and the setting `app.debug` is disabled. - Added "Auto close tags and special characters" to Code editor preferences. diff --git a/config/cms.php b/config/cms.php index b9d279ce3..f166d8358 100644 --- a/config/cms.php +++ b/config/cms.php @@ -186,7 +186,7 @@ return array( | */ - 'uploadsPath' => '/uploads', + 'uploadsPath' => '/storage/app/uploads', /* |-------------------------------------------------------------------------- diff --git a/modules/backend/controllers/index/_warnings.htm b/modules/backend/controllers/index/_warnings.htm index c2d259e71..e43cc1778 100644 --- a/modules/backend/controllers/index/_warnings.htm +++ b/modules/backend/controllers/index/_warnings.htm @@ -4,9 +4,6 @@ $warnings = []; $writablePaths = [ temp_path(), themes_path(), - uploads_path(), - uploads_path().'/public', - uploads_path().'/protected', base_path().'/storage', base_path().'/storage/app', base_path().'/storage/logs', diff --git a/modules/system/models/File.php b/modules/system/models/File.php index fa05cf605..7fe8f0d34 100644 --- a/modules/system/models/File.php +++ b/modules/system/models/File.php @@ -21,25 +21,12 @@ class File extends FileBase // Configuration // - /** - * Define the storage path, override this method to define. - */ - public function getStorageDirectory() - { - if ($this->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'); + $uploadsPath = Config::get('cms.uploadsPath', '/storage/app/uploads'); if (!preg_match("/(\/\/|http|https)/", $uploadsPath)) { $uploadsPath = Request::getBasePath() . $uploadsPath; diff --git a/uploads/protected/.gitignore b/uploads/protected/.gitignore deleted file mode 100644 index c96a04f00..000000000 --- a/uploads/protected/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file diff --git a/uploads/public/.gitignore b/uploads/public/.gitignore deleted file mode 100644 index c96a04f00..000000000 --- a/uploads/public/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file