lib/carrierwave/storage/ftp.rb in carrierwave-ftp-0.1.1 vs lib/carrierwave/storage/ftp.rb in carrierwave-ftp-0.1.2
- old
+ new
@@ -76,10 +76,11 @@
res.body
end
def connection
ftp = ExFTP.open(@uploader.ftp_host, @uploader.ftp_user, @uploader.ftp_passwd, @uploader.ftp_port)
+ ftp.passive = @uploader.ftp_passive
yield ftp
ftp.close
end
end
end
@@ -93,16 +94,18 @@
add_config :ftp_port
add_config :ftp_user
add_config :ftp_passwd
add_config :ftp_folder
add_config :ftp_url
+ add_config :ftp_passive
configure do |config|
config.storage_engines[:ftp] = "CarrierWave::Storage::FTP"
config.ftp_host = "localhost"
config.ftp_port = 21
config.ftp_user = "anonymous"
config.ftp_passwd = ""
config.ftp_folder = "/"
config.ftp_url = "http://localhost"
+ config.ftp_passive = false
end
end