demarches-normaliennes/app/uploaders/remote_downloader.rb
2018-10-31 12:53:14 +01:00

17 lines
277 B
Ruby

class RemoteDownloader
def initialize(filename)
@filename = filename
end
def url
if @filename.present?
@url ||= File.join(base_url, CarrierWave::Uploader::Base.fog_directory, @filename)
end
end
protected
def base_url
FOG_BASE_URL
end
end