Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicaƫl Bergeron <mbergeron@gitlab.com>2018-04-23 19:59:53 +0300
committerJohn Northrup <john@gitlab.com>2018-04-23 19:59:53 +0300
commit741f333d23cd09de328c9f4035c16210cb97aa10 (patch)
tree7d7d064ad4b16848bd82a1c26876e5a4292151a3 /app/uploaders/gitlab_uploader.rb
parentc0eabb84f57aed587589839136dadff01836e888 (diff)
Resolve "Avatar URLs are wrong when using a CDN path and Object Storage"
Diffstat (limited to 'app/uploaders/gitlab_uploader.rb')
-rw-r--r--app/uploaders/gitlab_uploader.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/gitlab_uploader.rb b/app/uploaders/gitlab_uploader.rb
index f12f0466a1d..f8a237178d9 100644
--- a/app/uploaders/gitlab_uploader.rb
+++ b/app/uploaders/gitlab_uploader.rb
@@ -65,6 +65,10 @@ class GitlabUploader < CarrierWave::Uploader::Base
!!model
end
+ def local_url
+ File.join('/', self.class.base_dir, dynamic_segment, filename)
+ end
+
private
# Designed to be overridden by child uploaders that have a dynamic path