Posting multipart XML data to rails

I’m posting xml data to rails. I’d like to be able to include a file
within the request, probably by sending both xml & binary data as a
single multipart request.

As far as I can tell, Rails’ current param_parsers methods won’t
handle this. I confess I’m struggling to even get ruby’s CGI class to
handle multipart data… has anyone else succeeded in writing their
own param_parser that will handle multipart XML? Am I missing any
alternative methods?