Class: Paperclip::Nginx::Upload::IOAdapter

Inherits:
AbstractAdapter
  • Object
show all
Defined in:
lib/paperclip/nginx/upload/io_adapter.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, options = {}) ⇒ IOAdapter

Returns a new instance of IOAdapter.



20
21
22
23
24
25
26
# File 'lib/paperclip/nginx/upload/io_adapter.rb', line 20

def initialize(target, options = {})
  @target = target
  @options = self.class.default_options.merge(options)

  require_whitelist_match!(@target[:tmp_path])
  cache_current_values
end

Instance Attribute Details

#original_filename=(value) ⇒ Object (writeonly)

Sets the attribute original_filename

Parameters:

  • value

    the value to set the attribute original_filename to.



17
18
19
# File 'lib/paperclip/nginx/upload/io_adapter.rb', line 17

def original_filename=(value)
  @original_filename = value
end

Class Method Details

.default_optionsObject



28
29
30
31
32
33
# File 'lib/paperclip/nginx/upload/io_adapter.rb', line 28

def self.default_options
  @default_options ||= {
    :tmp_path_whitelist => [],
    :move_tempfile => false
  }
end