# Mongrel upload problem with progress bar

**URL:** <https://www.ruby-forum.com/t/mongrel-upload-problem-with-progress-bar/89855>\
**Category:** Rails\
**Created:** [March 23, 2007, 11:25am UTC](https://www.ruby-forum.com/t/mongrel-upload-problem-with-progress-bar/89855 "2007-03-23T11:25:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![friofool](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@friofool](https://www.ruby-forum.com/u/friofool)\
**Post date:** [March 23, 2007, 11:25am UTC](https://www.ruby-forum.com/t/mongrel-upload-problem-with-progress-bar/89855/1 "2007-03-23T11:25:22Z")

</div>

Hello,

I’m trying to install the upload\_progress gem and i can’t see the upload  
progress status.

My config is :

apache2 with mod\_proxy  
mongrel  
rails

upload.rb : ##############

require ‘rubygems’  
require ‘drb’  
require ‘gem\_plugin’  
GemPlugin::Manager.instance.load ‘mongrel’ =\> GemPlugin::INCLUDE  
DRb.start\_service ‘druby://0.0.0.0:2999’, Mongrel::UploadProgress.new  
DRb.thread.join

mongrel\_upload\_progress.conf : ##########

uri “/”,  
:handler =\> plugin("/handlers/upload",  
:path\_info =\> ‘/files/upload’,  
:frequency =\> 1,  
:drb =\> ‘druby://0.0.0.0:2999’),  
:in\_front =\> true

routes.rb :

map.connect ‘/files/’,:controller=\>“files”

files\_controller : #####################

class FilesController \< ApplicationController  
session :off, :only =\> :progress

def index  
end

def progress  
render :update do |page|  
@status = Mongrel::Uploads.check(params[:upload\_id])  
logger.info(params[:upload\_id])  
page.upload\_progress.update(@status[:size], @status[:received]) if  
@status  
end  
end

def upload  
render :text =\> %(UPLOADED: #{params.inspect}.window.parent.UploadProgress.finish();)  
end  
end

When i try to upload a file i got this log in my production\_log :

Processing FilesController#progress (for my\_IP at 2007-03-23 10:42:56)  
[POST]  
Parameters: {“action”=\>“progress”, “controller”=\>“files”,  
“upload\_id”=\>“1174642904”}  
1174642904  
Completed in 0.00594 (168 reqs/sec) | Rendering: 0.00572 (96%) | DB:  
0.00000 (0%) | 200 OK  
[http://IP\_SERVEUR/files/progress?upload\_id=1174642904]

Processing FilesController#progress (for my\_IP at 2007-03-23 10:42:59)  
[POST]  
Parameters: {“action”=\>“progress”, “controller”=\>“files”,  
“upload\_id”=\>“1174642904”}  
1174642904  
Completed in 0.00597 (167 reqs/sec) | Rendering: 0.00574 (96%) | DB:  
0.00000 (0%) | 200 OK  
[http://IP\_SERVEUR/files/progress?upload\_id=1174642904]

Processing FilesController#progress (for my\_IP at 2007-03-23 10:43:02)  
[POST]  
Parameters: {“action”=\>“progress”, “controller”=\>“files”,  
“upload\_id”=\>“1174642904”}  
1174642904  
Completed in 0.00892 (112 reqs/sec) | Rendering: 0.00858 (96%) | DB:  
0.00000 (0%) | 200 OK  
[http://IP\_SERVEUR/files/progress?upload\_id=1174642904]

Processing FilesController#progress (for my\_IP at 2007-03-23 10:43:05)  
[POST]  
Parameters: {“action”=\>“progress”, “controller”=\>“files”,  
“upload\_id”=\>“1174642904”}  
1174642904  
Completed in 0.00581 (172 reqs/sec) | Rendering: 0.00558 (96%) | DB:  
0.00000 (0%) | 200 OK  
[http://IP\_SERVEUR/files/progress?upload\_id=1174642904]

Processing FilesController#progress (for my\_IP at 2007-03-23 10:43:08)  
[POST]  
Parameters: {“action”=\>“progress”, “controller”=\>“files”,  
“upload\_id”=\>“1174642904”}  
1174642904  
Completed in 0.00578 (173 reqs/sec) | Rendering: 0.00556 (96%) | DB:  
0.00000 (0%) | 200 OK  
[http://IP\_SERVEUR/files/progress?upload\_id=1174642904]

Processing FilesController#upload (for my\_IP at 2007-03-23 10:43:09)  
[POST]  
Session ID: 85a4fa5dc5f0c442742c393746455108  
Parameters: {“commit”=\>“Upload”, “action”=\>“upload”,  
“controller”=\>“files”, “upload\_id”=\>“1174642904”,  
“data”=\>#\<File:/tmp/CGI.6545.0\>}  
Completed in 0.00026 (3862 reqs/sec) | Rendering: 0.00006 (22%) | DB:  
0.00000 (0%) | 200 OK  
[http://IP\_SERVEUR/files/upload?upload\_id=1174642904]

The @status is always nil.

I don’t know what ito do, is anyone have this problem before ?

Thanks for your help.

Seb.

ps: sorry for my english …

---

<div class="post-metadata">

**Author:** ![friofool](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/6de8d8/32.png) [@friofool](https://www.ruby-forum.com/u/friofool)\
**Post date:** [March 26, 2007, 2:39pm UTC](https://www.ruby-forum.com/t/mongrel-upload-problem-with-progress-bar/89855/2 "2007-03-26T14:39:55Z")

</div>

hello,

the problem is solved.  
The solution is to turn off the apache mod\_security…

bye
