diff options
author | Hannes Rosenögger <123haynes@gmail.com> | 2015-02-14 19:52:45 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-17 22:21:13 +0100 |
commit | 9729cc584f5758395960416f308a9c45f698cdee (patch) | |
tree | e4b45ad34333e1a9ca9035bfddf5e7d2ef56932c /app/uploaders | |
parent | ca504a77fe994da893cd0632de5e0e7ea5b729fc (diff) | |
download | gitlab-ce-9729cc584f5758395960416f308a9c45f698cdee.tar.gz |
implement Project::UploadsController
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/file_uploader.rb | 4 |
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? |