summaryrefslogtreecommitdiff
path: root/app/uploaders
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-02-14 19:52:45 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-17 22:21:13 +0100
commit9729cc584f5758395960416f308a9c45f698cdee (patch)
treee4b45ad34333e1a9ca9035bfddf5e7d2ef56932c /app/uploaders
parentca504a77fe994da893cd0632de5e0e7ea5b729fc (diff)
downloadgitlab-ce-9729cc584f5758395960416f308a9c45f698cdee.tar.gz
implement Project::UploadsController
Diffstat (limited to 'app/uploaders')
-rw-r--r--app/uploaders/file_uploader.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb
index ac7bd5b27ec..51ae8040e52 100644
--- a/app/uploaders/file_uploader.rb
+++ b/app/uploaders/file_uploader.rb
@@ -40,7 +40,9 @@ class FileUploader < CarrierWave::Uploader::Base
end
def secure_url
- Gitlab.config.gitlab.relative_url_root + "/files/#{@path}/#{@filename}"
+ path_array = @path.split('/')
+ path = File.join(path_array[0],path_array[1],'uploads',path_array[2])
+ Gitlab.config.gitlab.relative_url_root + "/#{path}/#{@filename}"
end
def image?