Upload a file using Net:HTTP multipart post or ActiveResource

Hi Guys,

I am trying to upload a file to a rails server using a ruby script.

I verified the parameters of the Net:HTTP post request and they seem
to be right. However the recipient, mongre,l shows following message
in console and the parameters sent, the file data, is all corrupted.
oh and one very weird thing happened. the console running mongrel
looks like following after it recieved the file upload request.

Earlier I was using ActiveResource to upload a file, but then I
realized that it doesn’t have support for multipart content type