greghauptmann
2009-Dec-08 17:55 UTC
[Rails] Sample code for doing a “chunked” webfile HTTP download, and then stream to HTTP upload to another web app?
Hi, QUESTION: Does anyone have sample code that shows how to do an (a) chunked HTTP file download, and then (b) stream this into the HTTP uploading of this to another web application with a file upload controller? BACKGROUND * I''ve been trying to "stream" an existing webpage to a separate web application, using normal http request response approach. * The issue I''m hitting is that there are some times when preparing the upload, whereby the source webserver where I''m sourcing the file from does NOT set the **content-length**, hence I can''t set this for the upload. * My thinking is that to get around this the approach might be to use HTTP chunked mode (however I haven''t had any experience with this). I''m trying to avoid (a) having to download the file to disk first, but also (b) store the whole file up in memory before uploading * The upload has to be a POST thanks -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.