ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> rubyonrails-talk
rubyonrails-talk
[Rails] Re: binary upload and parsing with Rails
by Jeremy Kemper other posts by this author
Jun 19 2007 4:52PM messages near this date
[Rails] binary upload and parsing with Rails | [Rails] Re: Is "target" a reserved word?
On 6/19/07, chirag <patelc75@[...].com>  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: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Thread:
Chirag
Jeremy Kemper

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved