Class: Paperclip::DataUriAdapter

Inherits:
StringioAdapter show all
Defined in:
lib/paperclip/io_adapters/data_uri_adapter.rb

Constant Summary collapse

REGEXP =
/\Adata:([-\w]+\/[-\w\+\.]+)?;base64,(.*)/m

Constants inherited from AbstractAdapter

AbstractAdapter::OS_RESTRICTED_CHARACTERS

Instance Attribute Summary

Attributes inherited from StringioAdapter

#content_type

Attributes inherited from AbstractAdapter

#content_type, #original_filename, #size

Instance Method Summary collapse

Methods inherited from AbstractAdapter

#assignment?, #fingerprint, #inspect, #nil?, #read

Constructor Details

#initialize(target_uri) ⇒ DataUriAdapter

Returns a new instance of DataUriAdapter.



6
7
8
# File 'lib/paperclip/io_adapters/data_uri_adapter.rb', line 6

def initialize(target_uri)
  super(extract_target(target_uri))
end