title: What is the best way to upload a file to another Rails application?
body: <p>I 've researched and noticed that ActiveResource lack this functionality. So, what is the current state of the art when doing a file upload?</p>
  
  <p>One problem with Guillermo's approach is that the request has to be nested, like this:</p>
  
  <pre><code>body = { :file =&gt; {:uploaded_data =&gt; File.open("#{RAILS_ROOT}/public/tmp/" + original_filename), :owner_id =&gt; current_user.owner_id }, :api_key =&gt; '123123123123123123'}
  </code></pre>
  
  <p>Of course it is not possible to do a request like this with HttpClient. I tried other gems I found in github (sevenwire-http-client and technoweenie-rest-client) but they have problems with the file being nested. Is it possible to upload a file with a nested request?</p>