drupal_upload_progress.conf (870B)
1 # -*- mode: nginx; mode: flyspell-prog; ispell-current-dictionary: american -*- 2 3 ### Drupal 7 configuration for the Nginx Upload Progress module: 4 ### https://github.com/masterzen/nginx-upload-progress-module 5 ### This requires the Filefield Nginx Progress module: 6 ### http://drupal.org/project/filefield_nginx_progress. 7 8 ## The Nginx module wants ?X-Progress-ID query parameter so 9 ## that it report the progress of the upload through a GET 10 ## request. But the drupal form element makes use of clean 11 ## URLs in the POST. 12 13 location ~ (?<upload_form_uri>.*)/x-progress-id:(?<upload_id>\d*) { 14 rewrite ^ $upload_form_uri?X-Progress-ID=$upload_id; 15 } 16 17 ## Now the above rewrite must be matched by a location that 18 ## activates it and references the above defined upload 19 ## tracking zone. 20 location ^~ /progress { 21 upload_progress_json_output; 22 report_uploads uploads; 23 }