Module: CarrierWave::Uploader::Base64Download

Included in:
Base
Defined in:
lib/locomotive/carrierwave/patches.rb

Defined Under Namespace

Classes: Base64StringIO

Instance Method Summary collapse

Instance Method Details

#download!(uri_or_base64) ⇒ Object



77
78
79
80
81
82
83
84
# File 'lib/locomotive/carrierwave/patches.rb', line 77

def download!(uri_or_base64)
  if uri_or_base64 =~ /\Adata:/
    file = Base64StringIO.new(uri_or_base64)
    cache!(file)
  else
    download_without_base64!(uri_or_base64)
  end
end