2016-05-13 16:08:51 +02:00
|
|
|
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
|
2016-05-13 16:08:51 +02:00
|
|
|
end
|
|
|
|
end
|