Pete DeLaurentis
2007-Feb-23 02:35 UTC
[Mongrel] Mongrel::Uploads.check() not returning status
Hi,
I wrote a message earlier regarding how I wasn''t getting any feedback
from mongrel_upload_progress. After putting lots of debug messages
in the plugin, I figured out what was going on.
I had a route like this setup in routes.rb (this was the problem):
map.upload "upload/:upload_id",
:controller => "file",
:action => "upload"
And here''s my config/mongrel_upload_progress.conf file:
uri "/",
:handler => plugin("/handlers/upload", :path_info =>
''/file/upload''),
:in_front => true
My form was sending to :controller => file, :action => upload. Well,
the route turned this into "/upload/xxxxxxx", and this didn''t
match
the path_info "/file/upload".
Once I removed the route, the problem was fixed and progress started
coming through.
-Pete
On Feb 22, 2007, at 8:04 AM, Pete DeLaurentis wrote:
> Hi guys,
>
> I''m using mongrel_upload_progress and experiencing an error
similar
> to what another user hit on the list on Jan 19th.
>
> For this test, I''m running one mongrel:
>
> mongrel_rails start -p 3000 -S config/mongrel_upload_progress.conf
>
> Here''s my config/mongrel_upload_progress.conf file:
>
> uri "/",
> :handler => plugin("/handlers/upload", :path_info =>
''/file/
> upload''),
> :in_front => true
>
> Here''s my controller progress method. The upload ID is correct,
> but the status that comes back is always nil:
>
> def progress
> puts "Upload ID is valid: " + params[:upload_id]
>
> @status = Mongrel::Uploads.check(params[:upload_id])
> ...
> end
>
> Thanks for the help!
> Pete
>
> Here''s the Jan 19 post:
>
> I am trying to get the mongrel upload progress working and am
> having some problems. I am using Rails 1.1.6 and the latest install
> of mongrel. I created the config/mongrel_upload_progress.conf per
> the instructions ... it looks like this ...
>
> uri "/",
> :handler => plugin("/handlers/upload", :path_info =>
''/listings/
> add_photo''),
> :frequency => 1,
> :in_front => true
>
> Then I start mongrel like this ...
>
> mongrel_rails start -d -p 3000 -S config/mongrel_upload_progress.conf
>
> In my controller''s progress method I call ...
>
> @status = Mongrel::Uploads.check(params[:upload_id])
>
> However, @status is always nil. Any ideas? The upload_id is
> properly being sent.
>
> The file does upload; but the progress bar just goes from 0% to
> 100% once the upload is finished.
>
> Thanks.
>
> Bill Siggelkow
> AIM: siggelkowb
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/mongrel-users/attachments/20070222/5da58d82/attachment-0001.html
