The following code uploads the file via ftp and it works.
require 'net/ftp'
ftp = Net::FTP.new
ftp.passive = true
ftp.connect("***")
ftp.login("***","***")
ftp.chdir "claimsecure-xml-files"
ftp.putbinaryfile("file.xls",File.basename("file.xls"))
ftp.quit
But how can I assure whether the upload was successful?
after
ftp.putbinaryfile("file.xls",File.basename("file.xls"))
check
puts ftp.last_response
Crudely - you could "get" the file back and ensure its the same...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With