diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-07-17 09:16:33 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-07-18 15:38:11 +0200 |
commit | 27a6aa4f515cb46ef3f72cad962b25ceee52986a (patch) | |
tree | 5251ab0aedac388734a50c3a1c9c055e8cd85a8d | |
parent | 11f9ac0a48b62cef25eedede4c1819964f08d5ce (diff) | |
download | gitlab-ce-27a6aa4f515cb46ef3f72cad962b25ceee52986a.tar.gz |
Move system-uploads to `-/system`
-rw-r--r-- | app/uploaders/gitlab_uploader.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/bvl-free-system-namespace.yml | 4 | ||||
-rw-r--r-- | config/routes/uploads.rb | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/app/uploaders/gitlab_uploader.rb b/app/uploaders/gitlab_uploader.rb index 0da7a025591..05a2091633a 100644 --- a/app/uploaders/gitlab_uploader.rb +++ b/app/uploaders/gitlab_uploader.rb @@ -16,7 +16,7 @@ class GitlabUploader < CarrierWave::Uploader::Base def self.base_dir return root_dir unless file_storage? - File.join(root_dir, 'system') + File.join(root_dir, '-', 'system') end def self.file_storage? diff --git a/changelogs/unreleased/bvl-free-system-namespace.yml b/changelogs/unreleased/bvl-free-system-namespace.yml new file mode 100644 index 00000000000..6c2d1e0e61f --- /dev/null +++ b/changelogs/unreleased/bvl-free-system-namespace.yml @@ -0,0 +1,4 @@ +--- +title: "Move uploads from `uploads/system` to `uploads/-/system` to free up `system` as a group name" +merge_request: 11713 +author: diff --git a/config/routes/uploads.rb b/config/routes/uploads.rb index a49e244af1a..ed5476c8f71 100644 --- a/config/routes/uploads.rb +++ b/config/routes/uploads.rb @@ -1,6 +1,6 @@ scope path: :uploads do # Note attachments and User/Group/Project avatars - get "system/:model/:mounted_as/:id/:filename", + get "-/system/:model/:mounted_as/:id/:filename", to: "uploads#show", constraints: { model: /note|user|group|project/, mounted_as: /avatar|attachment/, filename: /[^\/]+/ } @@ -15,7 +15,7 @@ scope path: :uploads do constraints: { filename: /[^\/]+/ } # Appearance - get "system/:model/:mounted_as/:id/:filename", + get "-/system/:model/:mounted_as/:id/:filename", to: "uploads#show", constraints: { model: /appearance/, mounted_as: /logo|header_logo/, filename: /.+/ } |