Explorar el Código

Adding instructions for jQuery AJAX compatablity, change the JSON template example to double quoted properties, and fixed a few minor spelling errors.

tags/v0.9.0
root hace 14 años
padre
commit
14a66c49c2
Se han modificado 1 ficheros con 21 adiciones y 6 borrados
  1. 21
    6
      README

+ 21
- 6
README Ver fichero

@@ -77,7 +77,7 @@ track_uploads
77 77
     The POST _must_ have a query parameter called X-Progress-ID (or an HTTP header of the same name) whose value is the
78 78
     unique identifier used to get progress information. If the POST has no such information, the upload will not be tracked.
79 79
     The tracked connections are kept at most <timeout> seconds after they have been finished to be able to serve 
80
-    unseful information to upload progress probes.
80
+    useful information to upload progress probes.
81 81
     WARNING: this directive must be the last directive of the location. It must be in a proxy_pass or 
82 82
     fastcgi_pass location.
83 83
     
@@ -107,7 +107,7 @@ report_uploads
107 107
             upload_progress_template
108 108
 
109 109
     The HTTP request to this location must have a X-Progress-ID parameter or HTTP header containing a valid
110
-    unique identifier of an inprogress upload.
110
+    unique identifier of an in progress upload.
111 111
 
112 112
 upload_progress_content_type
113 113
 ++++++++++++++++++++++++++++
@@ -133,6 +133,14 @@ upload_progress_jsonp_parameter
133 133
     :Description:
134 134
     This directive allows to change the name of the GET parameter with the jsonp callback name.
135 135
 
136
+upload_progress_java_output
137
++++++++++++++++++++++++++++
138
+    :Syntax: upload_progress_java_output
139
+    :Default: N/A
140
+    :Context: location
141
+    :Description:
142
+    This directive sets everything to output as eval() javascript compatible code.
143
+
136 144
 upload_progress_json_output
137 145
 +++++++++++++++++++++++++++
138 146
     :Syntax: upload_progress_json_output
@@ -179,10 +187,10 @@ upload_progress_template
179 187
 
180 188
     Example of jsonp response:
181 189
 
182
-    upload_progress_template starting "$uploadprogress_callback({ 'state' : 'starting'});";
183
-    upload_progress_template error "$uploadprogress_callback({ 'state' : 'error', 'status' : $uploadprogress_status });";
184
-    upload_progress_template done "$uploadprogress_callback({ 'state' : 'done'});";
185
-    upload_progress_template uploading "$uploadprogress_callback({ 'state' : 'uploading', 'received' : $uploadprogress_received, 'size' : $uploadprogress_length });";
190
+    upload_progress_template starting "$uploadprogress_callback({ \"state\" : \"starting\"});";
191
+    upload_progress_template error "$uploadprogress_callback({ \"state\" : \"error\", \"status\" : $uploadprogress_status });";
192
+    upload_progress_template done "$uploadprogress_callback({ \"state\" : \"done\"});";
193
+    upload_progress_template uploading "$uploadprogress_callback({ \"state\" : \"uploading\", \"received\" : $uploadprogress_received, \"size\" : $uploadprogress_length });";
186 194
 
187 195
 Configuration Example:
188 196
 +++++++++++++++++++++
@@ -302,3 +310,10 @@ http://www.grid.net.ru/nginx/upload.en.html
302 310
 You can also use the following javascript libraries client side:
303 311
 http://drogomir.com/blog/2008/6/30/upload-progress-script-with-safari-support
304 312
 
313
+Note that when using jQuery AJAX for progress monitoring, such as:
314
+https://github.com/drogus/jquery-upload-progress
315
+you should be sure to set a upload_progress template parameter:
316
+upload_progress_json_output
317
+or
318
+upload_progress_jsonp_output
319
+depending on your jQuery AJAX dataType setting.

Loading…
Cancelar
Guardar