lib/uploader/config.rb in uploader-3.0.2 vs lib/uploader/config.rb in uploader-3.1.0

- old
+ new

@@ -4,12 +4,12 @@ # Uploader.configure do |config| # config.enable_s3 = true # config.s3_no_wait = true # config.keep_local_file = true # config.has_attached_file_options = { -# :url => "/system/:attachment/:id_partition/:style/:basename.:extension", -# :path => ":rails_test/public/system/:attachment/:id_partition/:style/:basename.:extension", +# :url => "/system/:attachment/:id_partition/:style/:basename.:extension", +# :path => ":rails_root/public:url", # :styles => { :icon => "30x30!", # :thumb => "100>", # :small => "150>", # :medium => "300>", # :large => "660>" }, @@ -39,18 +39,20 @@ attr_accessor :has_attached_file_options attr_accessor :enable_s3 attr_accessor :s3_no_wait attr_accessor :keep_local_file attr_accessor :disable_halt_nonimage_processing + attr_accessor :temp_dir def initialize @enable_s3 = false @s3_no_wait = false @keep_local_file = true @disable_halt_nonimage_processing = false + @temp_dir = Dir::tmpdir @has_attached_file_options = { - :url => "/system/:attachment/:id_partition/:style/:basename.:extension", - :path => ":rails_test/public/system/:attachment/:id_partition/:style/:basename.:extension", + :url => "/system/:attachment/:id_partition/:style/:basename.:extension", + :path => ":rails_root/public:url", :styles => { :icon => "30x30!", :thumb => "100>", :small => "150>", :medium => "300>", :large => "660>" },