Hi all,
we are using nginx in front of a mongrel cluster to serve our Rails
application.
I am now trying to run a Rails Metal in front of the Rails stack to
handle file uploads. Some of the files are then transferred to a ftp
server.
To give feedback to the uploader I have recompiled the nginx package to
include the Upload Progress Module.
The config file basically looks like the one in the UploadProgressModule
example:
http://wiki.nginx.org/NginxHttpUploadProgressModule#Configuration_Example
upload_progress uploadtracker 1m;
location /customer/files/ftp_upload {
mongrel on development mode runns on port 3001
proxy_pass http://127.0.0.1:3001;
track_uploads uploadtracker 30s;
}
location ^~ /upload_progress {
report_uploads uploadtracker;
}
location / {
standard config…
}
While uploading files, the server responds to the progress requests, but
the received data seems to be off. The file size is correct, but the
received part of the JSON is always equal to the size, no matter how
large the file is.
The Server response always looks something like this (in this case about
230kb file):
new Object({ ‘state’ : ‘uploading’, ‘received’ : 235134, ‘size’ : 235134
})
Can anybody help me resolve this problem, why the progress module does
not send the correct received size?
Thanks
MSc
Posted at Nginx Forum: