0
Aşağıdaki kodu çalıştırarak, argüman dosyasını karşıya yüklemek için aşağıdaki hata iletisini aşağıdan iletiyorum. Bunu anlayamıyorum, herhangi bir yardım çok takdir edilir.Rest İstemci Mesaj hatası
Hata:
uploadhttp.rb:11:in `size': No such file or directory @ rb_file_s_size - hfs.exe (Errno::ENOENT) from uploadhttp.rb:11:in `<main>'
Kodu:
begin
RestClient::Request.execute(:method => :post, :url =>
'http://my external ip:8080/upload/', :timeout => 30, :open_timeout => 30,
:name_of_file_param => File.new("C:\\Users\\Michael\\Downloads\\#{nfile}"))
filesize=(File.size("#{nfile}"))
result=(filesize.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse)
print "#{result} bytes were uploaded to Mikez http file Server"
rescue RestClient::ExceptionWithResponse => err
puts "an error has occured potential timeout"
end