response = RestClient::Request.execute(:method=>:post, :url=> “http×××××”, :payload=>{:id=>id, :filename=>filename, :file=>File.new(Rails.public_path.to_s + filename, 'rb'), :multipart=>true}, :timeout=>10, :open_timeout=>120)
response = RestClient::Request.execute(:method=>:post, :url=> “http×××××”, :payload=>{:id=>id, :filename=>filename, :file=>File.new(Rails.public_path.to_s + filename, 'rb'), :multipart=>true}, :timeout=>10, :open_timeout=>120)
转载于:https://www.cnblogs.com/znsongshu/p/8026128.html