There are many actions in our rails application that perform regular webapp actions. But we have one action that takes a large XML file. I would like the rails not to parse the XML in params. Instead, I would like to get the URL parameters (/ documents / {id} / action) and then write the xml file to a specific directory. How do I get Rails to process it?
How to determine the action for this?
def handle_xml
end
Downloading is done using Content-Type: application / xml. This is a single file, not part of a multi-page form. The rounding operator will look like this:
curl-H 'Accept: application/xml' -H 'Content-Type: application/xml' -X POST -d '<?xml version="1.0" encoding="UTF-8"?><test></test>' http://0.0.0.0:3000/controller/handle_xml
source
share