demarches-normaliennes/app/uploaders/remote_downloader.rb
2018-08-23 15:55:32 +02:00

15 lines
269 B
Ruby

class RemoteDownloader
def initialize(filename)
@filename = filename
end
def url
@url ||= File.join(base_url, CarrierWave::Uploader::Base.fog_directory, @filename)
end
protected
def base_url
Rails.application.secrets.fog[:base_url]
end
end