Welcome! Log In Create A New Profile

Advanced

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

Tony Payne
July 14, 2009 12:57AM
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/.
Subject Author Posted

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

Tony Payne July 14, 2009 12:57AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 251
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready