Class: Uploader::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/uploader/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/uploader/config.rb', line 47

def initialize
  @enable_s3 = false
  @s3_no_wait = false
  @keep_local_file = true
  @disable_halt_nonimage_processing = false
  @temp_dir = Dir::tmpdir
  @use_http_status_failures = false
  @has_attached_file_options = {
    :url               => "/system/:attachment/:id_partition/:style/:basename.:extension",
    :path              => ":rails_root/public:url", 
    :styles  => { :icon => "30x30!", 
                  :thumb => "100>", 
                  :small => "150>", 
                  :medium => "300>", 
                  :large => "660>" },
    :default_url => "/images/default.jpg",
    :convert_options => {
       :all => '-quality 80'
     }
  }
end

Instance Attribute Details

#disable_halt_nonimage_processingObject

Returns the value of attribute disable_halt_nonimage_processing.



43
44
45
# File 'lib/uploader/config.rb', line 43

def disable_halt_nonimage_processing
  @disable_halt_nonimage_processing
end

#enable_s3Object

Returns the value of attribute enable_s3.



40
41
42
# File 'lib/uploader/config.rb', line 40

def enable_s3
  @enable_s3
end

#has_attached_file_optionsObject

Returns the value of attribute has_attached_file_options.



39
40
41
# File 'lib/uploader/config.rb', line 39

def has_attached_file_options
  @has_attached_file_options
end

#keep_local_fileObject

Returns the value of attribute keep_local_file.



42
43
44
# File 'lib/uploader/config.rb', line 42

def keep_local_file
  @keep_local_file
end

#s3_no_waitObject

Returns the value of attribute s3_no_wait.



41
42
43
# File 'lib/uploader/config.rb', line 41

def s3_no_wait
  @s3_no_wait
end

#temp_dirObject

Returns the value of attribute temp_dir.



44
45
46
# File 'lib/uploader/config.rb', line 44

def temp_dir
  @temp_dir
end

#use_http_status_failuresObject

This only applies to json requests



45
46
47
# File 'lib/uploader/config.rb', line 45

def use_http_status_failures
  @use_http_status_failures
end