views:

606

answers:

1

I’ve been trying to get the Nginx upload progress module running on WebFaction with Rails and Passenger (using Paperclip to upload to S3). The best result I have come up with so far are that it reports on start and on finish, but nothing in between. The Ajax request to the /progress path is working fine.

This is the nginx.conf file I have setup: http://pastie.org/835075

Any ideas?

A: 

What does the XHR request say midstream? If it says "starting" I solved it by changing the order of directives in the nginx.conf, though yours looks the same as mine.

Once I did that, it sent the JSON data, I found out jQuery 1.4 does not honor malformed JSON data. I added the upload_progress_json_output directive to ensure well-formed JSON.

location ^~ /progress {
  upload_progress_json_output;
  report_uploads proxied;
}
Hm - do you recall what change in order solved this? My problem is that it remains in the "starting" state until it’s complete, then at the very last minute the progress bar jumps to 100%.
Gordon Isnor
Sorry about not following up. Here is my nginx.conf.http://pastie.org/881100