Upload progress module: "track_uploads" directive inside an "if" block.

Tony Payne lists at ruby-forum.com
Tue Jul 14 08:57:36 MSD 2009

Dave Rothlisberger wrote:
> After further investigation, it seems that the upload progress tracker
> is stuck at 'state: starting'.
> (while uploading a large file, if I do a GET for /upload_progress?X-
> Progress-ID=xxxx in a separate browser window, I get:
>    new Object({ 'state' : 'starting' })
> even a minute after it has started uploading).
> Once again, this only happens if the "track_uploads" directive is
> inside an "if" block; otherwise it works fine.
> Regards,
> Dave. Rothlisberger.

I think I have found a solution to this issue. I've created a location 
block that grabs the static file extensions and does the normal 
processing on them without the track_uploads call. Essentially, this 
means I can't track uploads to URLs ending in CSS, JS, etc. I can live 
with that. It also means that full page caching probably won't work, but 
I don't use that. Here's my new location block:

    location ~* \.(jpg|gif|png|css|js|htm|html)(\?[0-9]+)?$ {
      proxy_set_header  X-Real-IP  $remote_addr;
      proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_redirect false;
      proxy_max_temp_file_size 0;
      if (!-f $request_filename) {
        proxy_pass http://mongrel; break;
Posted via http://www.ruby-forum.com/.

More information about the nginx mailing list