diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-20 15:56:12 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-20 16:01:37 +0100 |
commit | 7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5 (patch) | |
tree | 4c4e79d21dc6d2ec0d280debfc0b469d92f27725 /app/uploaders | |
parent | 218283b368161130f43333e75629870c9649b319 (diff) | |
download | gitlab-ce-7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5.tar.gz |
Fix URL to uploaded file.
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/file_uploader.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index 36a28f93c49..f9673abbfe8 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -25,6 +25,10 @@ class FileUploader < CarrierWave::Uploader::Base SecureRandom.hex end + def secure_url + File.join(Gitlab.config.gitlab.url, @project.path_with_namespace, "uploads", @secret, file.filename) + end + def file_storage? self.class.storage == CarrierWave::Storage::File end |