diff options
Diffstat (limited to 'app/uploaders/file_uploader.rb')
-rw-r--r-- | app/uploaders/file_uploader.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/uploaders/file_uploader.rb b/app/uploaders/file_uploader.rb index bdfbfc668bd..36a28f93c49 100644 --- a/app/uploaders/file_uploader.rb +++ b/app/uploaders/file_uploader.rb @@ -2,13 +2,15 @@ class FileUploader < CarrierWave::Uploader::Base storage :file + attr_accessor :project, :secret + def initialize(project, secret = self.class.generate_secret) @project = project @secret = secret end def base_dir - "#{Rails.root}/uploads" + "uploads" end def store_dir @@ -23,10 +25,6 @@ class FileUploader < CarrierWave::Uploader::Base SecureRandom.hex end - def secure_url - File.join(Gitlab.config.gitlab.relative_url_root, @project.path_with_namespace, "uploads", @secret, file.filename) - end - def file_storage? self.class.storage == CarrierWave::Storage::File end |