title: Send multiple files using HTTParty
body: <p>Here is the code which is working using <code>Net::HTTP::Post</code></p>
  
  <pre><code>request = Net::HTTP::Post.new(url)
  ...
  form_data = [
    ['attachments[]', File.open('file1.txt')],
    ['attachments[]', File.open('file2.txt')]
  ]
  request.set_form form_data, 'multipart/form-data'
  http.request(request)
  </code></pre>
  
  <p>Now, I am trying to use <code>httparty</code> like below but it is not working.</p>
  
  <pre><code>body = { attachments: [ File.open('file1.txt'), File.open('file2.txt') ] }
  
  HTTParty.post(url, body: body)
  </code></pre>
  
  <p>The response I am getting from web service call is below:</p>
  
  <pre><code>#&lt;HTTParty::Response:0x557d7b549f90 parsed_response={"error"=&gt;true, "error_code"=&gt;"invalid_attachment", "error_message"=&gt;"Attachmen
  t(s) not found or invalid."}, @response=#&lt;Net::HTTPBadRequest 400 Bad Request readbody=true&gt;, @headers={"server"=&gt;["nginx"], "date"=&gt;[
  "Mon, 20 May 2019 07:41:50 GMT"], "content-type"=&gt;["application/json"], "content-length"=&gt;["102"], "connection"=&gt;["close"], "vary"=&gt;["
  Authorization"], "set-cookie"=&gt;["c18664e1c22ce71c0c91742fbeaaa863=uv425hihrbdatsql1udrlbs9as; path=/"], "expires"=&gt;["Thu, 19 Nov 1981
  08:52:00 GMT", "-1"], "cache-control"=&gt;["no-store, no-cache, must-revalidate", "private, must-revalidate"], "pragma"=&gt;["no-cache", "no
  -cache"], "x-ratelimit-limit"=&gt;["60"], "x-ratelimit-remaining"=&gt;["59"], "strict-transport-security"=&gt;["max-age=63072000; includeSubdom
  ains;"]}&gt;
  </code></pre>
  
  <p>It looks like it is not able to read the contents of files. Does <code>HTTParty</code> support this or I need to use some other gem? </p>