title: How to keep Rails from Processing Large XML Post
body: <p>In our rails application we have a many actions that do regular webapp actions. But, we have a single action that accepts a large XML file. I would like to keep rails from parsing the XML into params. Instead, I would like to be able to get the URL params ( /documents/{id}/action ) and then write out the xml file to a specific directory. How do I keep Rails from processing it?</p>
  
  <p>How would I define the action to handle this?</p>
  
  <pre><code>def handle_xml
     # what to put here
  end
  </code></pre>
  
  <p>The upload is done using Content-Type: application/xml  It is a single file, and not part of a multipart form. The sample curl statement would be:</p>
  
  <pre><code>curl-H 'Accept: application/xml' -H 'Content-Type: application/xml' -X POST -d '&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;test&gt;&lt;/test&gt;' http://0.0.0.0:3000/controller/handle_xml
  </code></pre>