Nginx Upload Progress Module with Rails and Passenger
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: ht开发者_如何学运维tp://pastie.org/835075
Any ideas?
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;
}
精彩评论