On 6/19/07, chirag <patelc75-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
wrote:> 1. What is the best way for me to upload a binary file to a Rails
> site? I''ll be uploading from a .NET client.
Do a PUT request with Content-Type: application/octet-stream,
Content-Length: yourfilesize, and send the file verbatim as the
request body.
> 2. What is the best way to parse the binary file to extract the data?
> Would I need to "drop" to C and read the binary file that way?
Read the body using request.raw_post
jeremy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---