I''m a bit confused about how to get upload progress to work with mongrel.. I''ve installed the mongrel_upload_progress (0.1) gem, but have no idea what to do with it. According to the following page: http://technoweenie.backpackit.com/pub/602283 there''s a patch (mup.diff) which seems like it patches the mongrel_upload_progress plugin The following blog entry makes it seem as though the upload_progress gem plugin is unfinished: http://weblog.techno-weenie.net/2006/6/18/rails-deployment And on the following site: http://redhanded.hobix.com/cult/mongrel0313WithLargeFileUploadsConditionalHttpUploadProgressPatchAllAreGoodThings.html it links to a patch (http://rubyforge.org/pipermail/mongrel-users/attachments/20060511/8ba26353/attachment.obj) which looks like it patches the mongrel code directly (not using a plugin) so there seems to be two patches and a plugin. I''m not sure which is the correct method to use for implementing upload progress, so I was hoping someone here could give me some direction, since I''d really like to be able to get thi working. Unfortunately, under the documentation section of the mongrel site, there''s nothing written for the mongrel upload progress plugin, so that seems to be a dead end for now as well. Thanks, Mike
On Sun, 2006-07-02 at 16:27 -0400, Mike Garey wrote:> I''m a bit confused about how to get upload progress to work with > mongrel.. I''ve installed the mongrel_upload_progress (0.1) gem, but > have no idea what to do with it. >Hey Mike, it''s sort of a work in progress right now. I''ll try to write up some documentation shortly. We''re doing a pre-release of 0.4 very soon which will make upload progress work much better. The gist of it, if you''re feeling adventurous, is to install the mongrel_upload_progress gem: gem install mongrel_upload_progress Then create a mongrel config script with called mongrel.conf with: uri "/", :handler => Upload.new("/upload"), :in_front => true And then make sure you have a Rails handler which can handle requests for /upload and which can answer requests for /progress with status. The status comes from the Mongrel::Uploads singleton which keeps track of what''s going on. But don''t waste too much time on this, it''s still pretty rough. Rick should have a Rails plugin for this out soon once we get it working better. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support?
On Sun, Jul 02, 2006 at 08:56:53PM -0400, Zed Shaw wrote:> The gist of it, if you''re feeling adventurous, is to install the > mongrel_upload_progress gem: > > gem install mongrel_upload_progress > > Then create a mongrel config script with called mongrel.conf with: > > uri "/", :handler => Upload.new("/upload"), :in_front => true >If you''re running 0.3.13.3, you''ll also need to supply the PATH_INFO to the exact URL using the upload meter. uri "/", :handler => Upload.new(:path_info => "/upload"), :in_front => true If you''re using the Mongrel 0.4 branch, you can just mount the handler anywhere in the path above or on your upload pages. And it doesn''t need to be in front, it''ll get notifications regardless of its placement. GemPlugin::Manager.instance.load "mongrel" => GemPlugin::INCLUDE uri "/upload", :handler => plugin("/handlers/upload") _why
On 7/2/06, Zed Shaw <zedshaw at zedshaw.com> wrote:> > Then create a mongrel config script with called mongrel.conf with: > > uri "/", :handler => Upload.new("/upload"), :in_front => true > > And then make sure you have a Rails handler which can handle requests > for /upload and which can answer requests for /progress with status. > The status comes from the Mongrel::Uploads singleton which keeps track > of what''s going on.thanks for the reply Zed, but I''m still a bit confused.. I''ve added the mongrel.conf file with the line you suggested, and then added a route from /upload to an action method called "upload" in my site_controller, but I''m not sure what the upload method (or progress method) is supposed to do. Is the upload method supposed to be the action that''s called from my file upload form? Am I supposed to call Mongrel::Uploads.initialize and then interact with the uploads singleton myself? Does anybody have a working upload form that I can take a look at to see how it should be done? I realize that this is still in a pretty rough form, but I was hoping I''d be able to test this out, since I had previously been using the rails upload progress plugin with apache 1.3 and mod_fastcgi, and it would work intermittently.. I wanted to see how the mongrel version compares as far as reliability. Thanks, Mike -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060704/d097073f/attachment.html
On Tue, 2006-07-04 at 08:37 -0400, Mike Garey wrote:> On 7/2/06, Zed Shaw <zedshaw at zedshaw.com> wrote: > Then create a mongrel config script with called mongrel.conf > with:<snip>> I realize that this is still in a pretty rough form, but I was hoping > I''d be able to test this out, since I had previously been using the > rails upload progress plugin with apache 1.3 and mod_fastcgi, and it > would work intermittently.. I wanted to see how the mongrel version > compares as far as reliability. Thanks,Yeah, it might be way too early to mess with it just yet. It''s not difficult, but there''s some documentation that needs to be written before people could really get down and use it. If you''re still desperate to mess with it, hop onto irc.freenode org sometime and msg me. I''m zedas and usually hang out in #rubyonrails. -- Zed A. Shaw http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.railsmachine.com/ -- Need Mongrel support?