demarches-normaliennes/app/uploaders/remote_downloader.rb

18 lines
277 B
Ruby
Raw Normal View History

class RemoteDownloader
def initialize(filename)
@filename = filename
end
def url
2018-10-31 12:50:48 +01:00
if @filename.present?
@url ||= File.join(base_url, CarrierWave::Uploader::Base.fog_directory, @filename)
end
2018-08-22 17:36:15 +02:00
end
protected
def base_url
2018-09-03 15:47:12 +02:00
FOG_BASE_URL
end
end