清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
require 'net/ftp' ftp = Net::FTP.new('ftp.domain.com') ftp.passive = true ftp.login ftp.chdir('/your/folder/name/here') count = 0 ftp.putbinaryfile('local_file', 'local_file', 100000) do |block| count += 100000 puts "#{count} bytes uploaded" end ftp.close