Browse Source

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 14 years ago
parent
commit
14a66c49c2
1 changed files with 21 additions and 6 deletions
  1. 21
    6
      README

+ 21
- 6
README View File

77
     The POST _must_ have a query parameter called X-Progress-ID (or an HTTP header of the same name) whose value is the
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
     unique identifier used to get progress information. If the POST has no such information, the upload will not be tracked.
78
     unique identifier used to get progress information. If the POST has no such information, the upload will not be tracked.
79
     The tracked connections are kept at most <timeout> seconds after they have been finished to be able to serve 
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
     WARNING: this directive must be the last directive of the location. It must be in a proxy_pass or 
81
     WARNING: this directive must be the last directive of the location. It must be in a proxy_pass or 
82
     fastcgi_pass location.
82
     fastcgi_pass location.
83
     
83
     
107
             upload_progress_template
107
             upload_progress_template
108
 
108
 
109
     The HTTP request to this location must have a X-Progress-ID parameter or HTTP header containing a valid
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
 upload_progress_content_type
112
 upload_progress_content_type
113
 ++++++++++++++++++++++++++++
113
 ++++++++++++++++++++++++++++
133
     :Description:
133
     :Description:
134
     This directive allows to change the name of the GET parameter with the jsonp callback name.
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
 upload_progress_json_output
144
 upload_progress_json_output
137
 +++++++++++++++++++++++++++
145
 +++++++++++++++++++++++++++
138
     :Syntax: upload_progress_json_output
146
     :Syntax: upload_progress_json_output
179
 
187
 
180
     Example of jsonp response:
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
 Configuration Example:
195
 Configuration Example:
188
 +++++++++++++++++++++
196
 +++++++++++++++++++++
302
 You can also use the following javascript libraries client side:
310
 You can also use the following javascript libraries client side:
303
 http://drogomir.com/blog/2008/6/30/upload-progress-script-with-safari-support
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…
Cancel
Save