At Mon, 15 Oct 2007 14:00:20 +0200, "Daniel Brahneborg" <[EMAIL PROTECTED]> wrote: > > Hi, > > I found the following page describing how to stream data from the > server to the client: > > http://api.rubyonrails.com/classes/ActionController/Streaming.html > > I want to do the opposite, streaming data from the client to the > server, letting the controller saving the data while it's being > received. In particular, I want to upload large files to the > RailsDav (http://www.liverail.net/railsdav) plugin, without having > to store the entire file in memory during the operation. > > This seems to be a Mongrel problem, so I started looking at this plugin: > > http://mongrel.rubyforge.org/docs/upload_progress.html > > How do I get Mongrel to store the incoming POST data in a tempfile, > passing a handler to that file as the raw_post field in the Rails request? > Is it even possible?
Hi Daniel, Mongrel is going to put a large POSTed body into a tempfile. Examine the mongrel.rb file around line 220. In this case your request.body is going to be a File object. Why do you think that there is a mongrel problem here? See also what Tim Kuijsten said in this thread. > How is the "request" parameter to the process() method related to > the "request" object in the Rails controllers? request in mongrel (as sent to process) is an instance of Mongrel::HttpRequest. In Rails it is an instance of ActionController::CgiRequest. best, Erik Hetzner ;; Erik Hetzner, California Digital Library ;; gnupg key id: 1024D/01DB07E3
pgpztcE0tmVbq.pgp
Description: PGP signature
_______________________________________________ Mongrel-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/mongrel-users
