|
525
|
1 |
<!DOCTYPE html> |
|
|
2 |
<html lang="en"> |
|
|
3 |
<head> |
|
|
4 |
<meta charset="utf-8"> |
|
|
5 |
<title>Example: Simple Multiple Files Uploader with Progress Tracking</title> |
|
|
6 |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic"> |
|
|
7 |
<link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css"> |
|
|
8 |
<link rel="stylesheet" href="../assets/css/main.css"> |
|
|
9 |
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css"> |
|
|
10 |
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png"> |
|
|
11 |
<script src="../../build/yui/yui-min.js"></script> |
|
|
12 |
|
|
|
13 |
</head> |
|
|
14 |
<body> |
|
|
15 |
<!-- |
|
|
16 |
<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> |
|
|
17 |
--> |
|
|
18 |
<div id="doc"> |
|
|
19 |
<div id="hd"> |
|
|
20 |
<h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1> |
|
|
21 |
</div> |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
<h1>Example: Simple Multiple Files Uploader with Progress Tracking</h1> |
|
|
25 |
<div class="yui3-g"> |
|
|
26 |
<div class="yui3-u-3-4"> |
|
|
27 |
<div id="main"> |
|
|
28 |
<div class="content"><div class="intro"> |
|
|
29 |
<p>In this example, the Uploader is used to send multiple images or videos to the server and monitor |
|
|
30 |
their upload progress with individual counters.</p> |
|
|
31 |
|
|
|
32 |
<p><strong>Please note:</strong> This example will not work when run from a local filesystem because of security restrictions in the transport protocols used. If you’d like to run this example locally, set up a local web server and launch it from there.</p> |
|
|
33 |
|
|
|
34 |
<p><strong>Also note:</strong> The uploader is not supported on iOS devices (iPhone and iPad), because they lack file upload capability. This example provides a graceful degradation message for all such systems.</p> |
|
|
35 |
|
|
|
36 |
<p><strong>Also note:</strong> The backend script used in these examples does not store any information it receives. Nevertheless, do not submit any sensitive or private data and keep |
|
|
37 |
your tests to a few small files to avoid overloading the system.</p> |
|
|
38 |
</div> |
|
|
39 |
|
|
|
40 |
<div class="example yui3-skin-sam"> |
|
|
41 |
<style> |
|
|
42 |
#filelist { |
|
|
43 |
margin-top: 15px; |
|
|
44 |
} |
|
|
45 |
|
|
|
46 |
#uploadFilesButtonContainer, #selectFilesButtonContainer, #overallProgress { |
|
|
47 |
display: inline-block; |
|
|
48 |
} |
|
|
49 |
|
|
|
50 |
#overallProgress { |
|
|
51 |
float: right; |
|
|
52 |
} |
|
|
53 |
</style> |
|
|
54 |
|
|
|
55 |
<div id="uploaderContainer"> |
|
|
56 |
<div id="selectFilesButtonContainer"> |
|
|
57 |
</div> |
|
|
58 |
<div id="uploadFilesButtonContainer"> |
|
|
59 |
<button type="button" id="uploadFilesButton" |
|
|
60 |
class="yui3-button" style="width:250px; height:35px;">Upload Files</button> |
|
|
61 |
</div> |
|
|
62 |
<div id="overallProgress"> |
|
|
63 |
</div> |
|
|
64 |
</div> |
|
|
65 |
|
|
|
66 |
<div id="filelist"> |
|
|
67 |
<table id="filenames"> |
|
|
68 |
<thead> |
|
|
69 |
<tr><th>File name</th><th>File size</th><th>Percent uploaded</th></tr> |
|
|
70 |
<tr id="nofiles"> |
|
|
71 |
<td colspan="3"> |
|
|
72 |
No files have been selected. |
|
|
73 |
</td> |
|
|
74 |
</tr> |
|
|
75 |
</thead> |
|
|
76 |
<tbody> |
|
|
77 |
</tbody> |
|
|
78 |
</table> |
|
|
79 |
</div> |
|
|
80 |
|
|
|
81 |
<script> |
|
|
82 |
|
|
|
83 |
YUI({filter:"raw"}).use("uploader", function(Y) { |
|
|
84 |
Y.one("#overallProgress").set("text", "Uploader type: " + Y.Uploader.TYPE); |
|
|
85 |
if (Y.Uploader.TYPE != "none" && !Y.UA.ios) { |
|
|
86 |
var uploader = new Y.Uploader({width: "250px", |
|
|
87 |
height: "35px", |
|
|
88 |
multipleFiles: true, |
|
|
89 |
swfURL: "../../build/uploader/assets/flashuploader.swf?t=" + Math.random(), |
|
|
90 |
uploadURL: "http://yuilibrary.com/sandbox/upload/", |
|
|
91 |
simLimit: 2, |
|
|
92 |
withCredentials: false |
|
|
93 |
}); |
|
|
94 |
var uploadDone = false; |
|
|
95 |
|
|
|
96 |
uploader.render("#selectFilesButtonContainer"); |
|
|
97 |
|
|
|
98 |
uploader.after("fileselect", function (event) { |
|
|
99 |
|
|
|
100 |
var fileList = event.fileList; |
|
|
101 |
var fileTable = Y.one("#filenames tbody"); |
|
|
102 |
if (fileList.length > 0 && Y.one("#nofiles")) { |
|
|
103 |
Y.one("#nofiles").remove(); |
|
|
104 |
} |
|
|
105 |
|
|
|
106 |
if (uploadDone) { |
|
|
107 |
uploadDone = false; |
|
|
108 |
fileTable.setHTML(""); |
|
|
109 |
} |
|
|
110 |
|
|
|
111 |
Y.each(fileList, function (fileInstance) { |
|
|
112 |
fileTable.append("<tr id='" + fileInstance.get("id") + "_row" + "'>" + |
|
|
113 |
"<td class='filename'>" + fileInstance.get("name") + "</td>" + |
|
|
114 |
"<td class='filesize'>" + fileInstance.get("size") + "</td>" + |
|
|
115 |
"<td class='percentdone'>Hasn't started yet</td>"); |
|
|
116 |
}); |
|
|
117 |
}); |
|
|
118 |
|
|
|
119 |
uploader.on("uploadprogress", function (event) { |
|
|
120 |
var fileRow = Y.one("#" + event.file.get("id") + "_row"); |
|
|
121 |
fileRow.one(".percentdone").set("text", event.percentLoaded + "%"); |
|
|
122 |
}); |
|
|
123 |
|
|
|
124 |
uploader.on("uploadstart", function (event) { |
|
|
125 |
uploader.set("enabled", false); |
|
|
126 |
Y.one("#uploadFilesButton").addClass("yui3-button-disabled"); |
|
|
127 |
Y.one("#uploadFilesButton").detach("click"); |
|
|
128 |
}); |
|
|
129 |
|
|
|
130 |
uploader.on("uploadcomplete", function (event) { |
|
|
131 |
var fileRow = Y.one("#" + event.file.get("id") + "_row"); |
|
|
132 |
fileRow.one(".percentdone").set("text", "Finished!"); |
|
|
133 |
}); |
|
|
134 |
|
|
|
135 |
uploader.on("totaluploadprogress", function (event) { |
|
|
136 |
Y.one("#overallProgress").setHTML("Total uploaded: <strong>" + event.percentLoaded + "%" + "</strong>"); |
|
|
137 |
}); |
|
|
138 |
|
|
|
139 |
uploader.on("alluploadscomplete", function (event) { |
|
|
140 |
uploader.set("enabled", true); |
|
|
141 |
uploader.set("fileList", []); |
|
|
142 |
Y.one("#uploadFilesButton").removeClass("yui3-button-disabled"); |
|
|
143 |
Y.one("#uploadFilesButton").on("click", function () { |
|
|
144 |
if (!uploadDone && uploader.get("fileList").length > 0) { |
|
|
145 |
uploader.uploadAll(); |
|
|
146 |
} |
|
|
147 |
}); |
|
|
148 |
Y.one("#overallProgress").set("text", "Uploads complete!"); |
|
|
149 |
uploadDone = true; |
|
|
150 |
}); |
|
|
151 |
|
|
|
152 |
Y.one("#uploadFilesButton").on("click", function () { |
|
|
153 |
if (!uploadDone && uploader.get("fileList").length > 0) { |
|
|
154 |
uploader.uploadAll(); |
|
|
155 |
} |
|
|
156 |
}); |
|
|
157 |
} |
|
|
158 |
else { |
|
|
159 |
Y.one("#uploaderContainer").set("text", "We are sorry, but to use the uploader, you either need a browser that support HTML5 or have the Flash player installed on your computer."); |
|
|
160 |
} |
|
|
161 |
|
|
|
162 |
|
|
|
163 |
}); |
|
|
164 |
|
|
|
165 |
</script> |
|
|
166 |
|
|
|
167 |
</div> |
|
|
168 |
|
|
|
169 |
<h2>Setting up Uploader UI</h2> |
|
|
170 |
<p>In this example, the UI for the Uploader consists of two buttons, a label field for displaying the uploader type and the overall upload progress, as well as a table for displaying information about the upload process per file. We first create the markup for the UI:</p> |
|
|
171 |
|
|
|
172 |
<pre class="code prettyprint"><div id="uploaderContainer"> |
|
|
173 |
<div id="selectFilesButtonContainer"> |
|
|
174 |
</div> |
|
|
175 |
<div id="uploadFilesButtonContainer"> |
|
|
176 |
<button type="button" id="uploadFilesButton" |
|
|
177 |
class="yui3-button" style="width:250px; height:35px;">Upload Files</button> |
|
|
178 |
</div> |
|
|
179 |
<div id="overallProgress"> |
|
|
180 |
</div> |
|
|
181 |
|
|
|
182 |
<div id="filelist"> |
|
|
183 |
<table id="filenames"> |
|
|
184 |
<thead> |
|
|
185 |
<tr><th>File name</th><th>File size</th><th>Percent uploaded</th></tr> |
|
|
186 |
<tr id="nofiles"> |
|
|
187 |
<td colspan="3"> |
|
|
188 |
No files have been selected. |
|
|
189 |
</td> |
|
|
190 |
</tr> |
|
|
191 |
</thead> |
|
|
192 |
<tbody> |
|
|
193 |
</tbody> |
|
|
194 |
</table> |
|
|
195 |
</div></pre> |
|
|
196 |
|
|
|
197 |
|
|
|
198 |
<p>Next, we create, configure and render an instance of the Uploader. Note that we initially check that the <code>Y.Uploader.TYPE</code> property is |
|
|
199 |
not set to 'none' and that we are not trying to run the code on an iOS device (where file uploads are not allowed because of a closed file system). |
|
|
200 |
Also note that we are setting a fixed width and height on the uploader, which is necessary in order for the Flash overlay to render correctly |
|
|
201 |
in browsers where Flash is used: |
|
|
202 |
</p> |
|
|
203 |
|
|
|
204 |
<pre class="code prettyprint">if (Y.Uploader.TYPE != "none" && !Y.UA.ios) { |
|
|
205 |
var uploader = new Y.Uploader({width: "250px", |
|
|
206 |
height: "35px", |
|
|
207 |
multipleFiles: true, |
|
|
208 |
swfURL: "../../build/uploader/assets/flashuploader.swf?t=" + Math.random(), |
|
|
209 |
uploadURL: "http://yuilibrary.com/sandbox/upload/", |
|
|
210 |
simLimit: 2, |
|
|
211 |
withCredentials: false |
|
|
212 |
}); |
|
|
213 |
|
|
|
214 |
var uploadDone = false; |
|
|
215 |
|
|
|
216 |
uploader.render("#selectFilesButtonContainer"); |
|
|
217 |
|
|
|
218 |
...</pre> |
|
|
219 |
|
|
|
220 |
|
|
|
221 |
<h2>Adding Uploader Event Handlers</h2> |
|
|
222 |
|
|
|
223 |
<p>We can now add handlers for various uploader events. The first handler is for the <code>fileselect</code> event. In it, we retrieve the list of |
|
|
224 |
files selected by the user and populate the table with their names, sizes and a field for reporting the percentage uploaded for each |
|
|
225 |
file. The id of each row in the table is prefixed with the unique file id it is associated with, for easy reference later:</p> |
|
|
226 |
|
|
|
227 |
<pre class="code prettyprint">uploader.after("fileselect", function (event) { |
|
|
228 |
var fileList = event.fileList; |
|
|
229 |
var fileTable = Y.one("#filenames tbody"); |
|
|
230 |
if (fileList.length > 0 && Y.one("#nofiles")) { |
|
|
231 |
Y.one("#nofiles").remove(); |
|
|
232 |
|
|
|
233 |
if (uploadDone) { |
|
|
234 |
uploadDone = false; |
|
|
235 |
fileTable.setHTML(""); |
|
|
236 |
} |
|
|
237 |
|
|
|
238 |
Y.each(fileList, function (fileInstance) { |
|
|
239 |
fileTable.append("<tr id='" + fileInstance.get("id") + "_row" + "'>" + |
|
|
240 |
"<td class='filename'>" + fileInstance.get("name") + "</td>" + |
|
|
241 |
"<td class='filesize'>" + fileInstance.get("size") + "</td>" + |
|
|
242 |
"<td class='percentdone'>Hasn't started yet</td>"); |
|
|
243 |
}); |
|
|
244 |
});</pre> |
|
|
245 |
|
|
|
246 |
<p>For the <code>uploadprogress</code> event, we update the individual file row (using the unique file id prefix to reference each row) with the |
|
|
247 |
<code>percentLoaded</code> property from the event payload.</p> |
|
|
248 |
|
|
|
249 |
<pre class="code prettyprint">uploader.on("uploadprogress", function (event) { |
|
|
250 |
var fileRow = Y.one("#" + event.file.get("id") + "_row"); |
|
|
251 |
fileRow.one(".percentdone").set("text", event.percentLoaded + "%"); |
|
|
252 |
});</pre> |
|
|
253 |
|
|
|
254 |
|
|
|
255 |
<p>When the upload starts, we disable the uploader and the <code>Upload Files</code> button until the upload process is complete:</p> |
|
|
256 |
|
|
|
257 |
<pre class="code prettyprint">uploader.on("uploadstart", function (event) { |
|
|
258 |
uploader.set("enabled", false); |
|
|
259 |
Y.one("#uploadFilesButton").addClass("yui3-button-disabled"); |
|
|
260 |
Y.one("#uploadFilesButton").detach("click"); |
|
|
261 |
});</pre> |
|
|
262 |
|
|
|
263 |
|
|
|
264 |
<p>When each individual file upload completes, we update the table row corresponding with the file with the appropriate |
|
|
265 |
message:</p> |
|
|
266 |
|
|
|
267 |
<pre class="code prettyprint">uploader.on("uploadcomplete", function (event) { |
|
|
268 |
var fileRow = Y.one("#" + event.file.get("id") + "_row"); |
|
|
269 |
fileRow.one(".percentdone").set("text", "Finished!"); |
|
|
270 |
});</pre> |
|
|
271 |
|
|
|
272 |
|
|
|
273 |
<p>On <code>totaluploadprogress</code> events, we report the overall upload progress in the top-right message container:</p> |
|
|
274 |
|
|
|
275 |
<pre class="code prettyprint">uploader.on("totaluploadprogress", function (event) { |
|
|
276 |
Y.one("#overallProgress").setHTML("Total uploaded: <strong>" + event.percentLoaded + "%" + "</strong>"); |
|
|
277 |
});</pre> |
|
|
278 |
|
|
|
279 |
|
|
|
280 |
<p>We can listen for the <code>alluploadscomplete</code> event to find out when all uploads have completed, re-enable the uploader and report that information accordingly:</p> |
|
|
281 |
|
|
|
282 |
<pre class="code prettyprint">uploader.on("alluploadscomplete", function (event) { |
|
|
283 |
uploader.set("enabled", true); |
|
|
284 |
uploader.set("fileList", []); |
|
|
285 |
Y.one("#uploadFilesButton").removeClass("yui3-button-disabled"); |
|
|
286 |
Y.one("#uploadFilesButton").on("click", function () { |
|
|
287 |
if (!uploadDone && uploader.get("fileList").length > 0) { |
|
|
288 |
console.log(uploader.get("fileList").length); |
|
|
289 |
uploader.uploadAll(); |
|
|
290 |
}); |
|
|
291 |
Y.one("#overallProgress").set("text", "Uploads complete!"); |
|
|
292 |
uploadDone = true; |
|
|
293 |
});</pre> |
|
|
294 |
|
|
|
295 |
|
|
|
296 |
<p>Finally, we add the <code>click</code> event listener to the "Upload Files" button to start the file upload process:</p> |
|
|
297 |
|
|
|
298 |
<pre class="code prettyprint">Y.one("#uploadFilesButton").on("click", function () { |
|
|
299 |
if (!uploadDone && uploader.get("fileList").length > 0) { |
|
|
300 |
console.log(uploader.get("fileList").length); |
|
|
301 |
uploader.uploadAll(); |
|
|
302 |
} |
|
|
303 |
});</pre> |
|
|
304 |
|
|
|
305 |
|
|
|
306 |
<h2>Full Source Code For this Example</h2> |
|
|
307 |
|
|
|
308 |
<pre class="code prettyprint"><style> |
|
|
309 |
#filelist { |
|
|
310 |
margin-top: 15px; |
|
|
311 |
} |
|
|
312 |
|
|
|
313 |
#uploadFilesButtonContainer, #selectFilesButtonContainer, #overallProgress { |
|
|
314 |
display: inline-block; |
|
|
315 |
} |
|
|
316 |
|
|
|
317 |
#overallProgress { |
|
|
318 |
float: right; |
|
|
319 |
} |
|
|
320 |
</style> |
|
|
321 |
|
|
|
322 |
<div id="uploaderContainer"> |
|
|
323 |
<div id="selectFilesButtonContainer"> |
|
|
324 |
</div> |
|
|
325 |
<div id="uploadFilesButtonContainer"> |
|
|
326 |
<button type="button" id="uploadFilesButton" |
|
|
327 |
class="yui3-button" style="width:250px; height:35px;">Upload Files</button> |
|
|
328 |
</div> |
|
|
329 |
<div id="overallProgress"> |
|
|
330 |
</div> |
|
|
331 |
</div> |
|
|
332 |
|
|
|
333 |
<div id="filelist"> |
|
|
334 |
<table id="filenames"> |
|
|
335 |
<thead> |
|
|
336 |
<tr><th>File name</th><th>File size</th><th>Percent uploaded</th></tr> |
|
|
337 |
<tr id="nofiles"> |
|
|
338 |
<td colspan="3"> |
|
|
339 |
No files have been selected. |
|
|
340 |
</td> |
|
|
341 |
</tr> |
|
|
342 |
</thead> |
|
|
343 |
<tbody> |
|
|
344 |
</tbody> |
|
|
345 |
</table> |
|
|
346 |
</div> |
|
|
347 |
|
|
|
348 |
<script> |
|
|
349 |
|
|
|
350 |
YUI({filter:"raw"}).use("uploader", function(Y) { |
|
|
351 |
Y.one("#overallProgress").set("text", "Uploader type: " + Y.Uploader.TYPE); |
|
|
352 |
if (Y.Uploader.TYPE != "none" && !Y.UA.ios) { |
|
|
353 |
var uploader = new Y.Uploader({width: "250px", |
|
|
354 |
height: "35px", |
|
|
355 |
multipleFiles: true, |
|
|
356 |
swfURL: "../../build/uploader/assets/flashuploader.swf?t=" + Math.random(), |
|
|
357 |
uploadURL: "http://yuilibrary.com/sandbox/upload/", |
|
|
358 |
simLimit: 2, |
|
|
359 |
withCredentials: false |
|
|
360 |
}); |
|
|
361 |
var uploadDone = false; |
|
|
362 |
|
|
|
363 |
uploader.render("#selectFilesButtonContainer"); |
|
|
364 |
|
|
|
365 |
uploader.after("fileselect", function (event) { |
|
|
366 |
|
|
|
367 |
var fileList = event.fileList; |
|
|
368 |
var fileTable = Y.one("#filenames tbody"); |
|
|
369 |
if (fileList.length > 0 && Y.one("#nofiles")) { |
|
|
370 |
Y.one("#nofiles").remove(); |
|
|
371 |
} |
|
|
372 |
|
|
|
373 |
if (uploadDone) { |
|
|
374 |
uploadDone = false; |
|
|
375 |
fileTable.setHTML(""); |
|
|
376 |
} |
|
|
377 |
|
|
|
378 |
Y.each(fileList, function (fileInstance) { |
|
|
379 |
fileTable.append("<tr id='" + fileInstance.get("id") + "_row" + "'>" + |
|
|
380 |
"<td class='filename'>" + fileInstance.get("name") + "</td>" + |
|
|
381 |
"<td class='filesize'>" + fileInstance.get("size") + "</td>" + |
|
|
382 |
"<td class='percentdone'>Hasn't started yet</td>"); |
|
|
383 |
}); |
|
|
384 |
}); |
|
|
385 |
|
|
|
386 |
uploader.on("uploadprogress", function (event) { |
|
|
387 |
var fileRow = Y.one("#" + event.file.get("id") + "_row"); |
|
|
388 |
fileRow.one(".percentdone").set("text", event.percentLoaded + "%"); |
|
|
389 |
}); |
|
|
390 |
|
|
|
391 |
uploader.on("uploadstart", function (event) { |
|
|
392 |
uploader.set("enabled", false); |
|
|
393 |
Y.one("#uploadFilesButton").addClass("yui3-button-disabled"); |
|
|
394 |
Y.one("#uploadFilesButton").detach("click"); |
|
|
395 |
}); |
|
|
396 |
|
|
|
397 |
uploader.on("uploadcomplete", function (event) { |
|
|
398 |
var fileRow = Y.one("#" + event.file.get("id") + "_row"); |
|
|
399 |
fileRow.one(".percentdone").set("text", "Finished!"); |
|
|
400 |
}); |
|
|
401 |
|
|
|
402 |
uploader.on("totaluploadprogress", function (event) { |
|
|
403 |
Y.one("#overallProgress").setHTML("Total uploaded: <strong>" + event.percentLoaded + "%" + "</strong>"); |
|
|
404 |
}); |
|
|
405 |
|
|
|
406 |
uploader.on("alluploadscomplete", function (event) { |
|
|
407 |
uploader.set("enabled", true); |
|
|
408 |
uploader.set("fileList", []); |
|
|
409 |
Y.one("#uploadFilesButton").removeClass("yui3-button-disabled"); |
|
|
410 |
Y.one("#uploadFilesButton").on("click", function () { |
|
|
411 |
if (!uploadDone && uploader.get("fileList").length > 0) { |
|
|
412 |
uploader.uploadAll(); |
|
|
413 |
} |
|
|
414 |
}); |
|
|
415 |
Y.one("#overallProgress").set("text", "Uploads complete!"); |
|
|
416 |
uploadDone = true; |
|
|
417 |
}); |
|
|
418 |
|
|
|
419 |
Y.one("#uploadFilesButton").on("click", function () { |
|
|
420 |
if (!uploadDone && uploader.get("fileList").length > 0) { |
|
|
421 |
uploader.uploadAll(); |
|
|
422 |
} |
|
|
423 |
}); |
|
|
424 |
} |
|
|
425 |
else { |
|
|
426 |
Y.one("#uploaderContainer").set("text", "We are sorry, but to use the uploader, you either need a browser that support HTML5 or have the Flash player installed on your computer."); |
|
|
427 |
} |
|
|
428 |
|
|
|
429 |
|
|
|
430 |
}); |
|
|
431 |
|
|
|
432 |
</script></pre> |
|
|
433 |
|
|
|
434 |
|
|
|
435 |
</div> |
|
|
436 |
</div> |
|
|
437 |
</div> |
|
|
438 |
|
|
|
439 |
<div class="yui3-u-1-4"> |
|
|
440 |
<div class="sidebar"> |
|
|
441 |
|
|
|
442 |
|
|
|
443 |
|
|
|
444 |
<div class="sidebox"> |
|
|
445 |
<div class="hd"> |
|
|
446 |
<h2 class="no-toc">Examples</h2> |
|
|
447 |
</div> |
|
|
448 |
|
|
|
449 |
<div class="bd"> |
|
|
450 |
<ul class="examples"> |
|
|
451 |
|
|
|
452 |
|
|
|
453 |
<li data-description="A simple multiple file uploader with progress tracking"> |
|
|
454 |
<a href="uploader-multiple.html">Simple Multiple Files Uploader with Progress Tracking</a> |
|
|
455 |
</li> |
|
|
456 |
|
|
|
457 |
|
|
|
458 |
|
|
|
459 |
<li data-description="A multiple file uploader with HTML5 Drag-and-Drop Support"> |
|
|
460 |
<a href="uploader-dd.html">Multiple Files Uploader with HTML5 Drag-and-Drop Support</a> |
|
|
461 |
</li> |
|
|
462 |
|
|
|
463 |
|
|
|
464 |
|
|
|
465 |
<li data-description="A multiple file uploader that submits additional POST vars with each file and receives data from the server"> |
|
|
466 |
<a href="uploader-data.html">Multiple Files Uploader with POST Variables and Server Data Retrieval</a> |
|
|
467 |
</li> |
|
|
468 |
|
|
|
469 |
|
|
|
470 |
</ul> |
|
|
471 |
</div> |
|
|
472 |
</div> |
|
|
473 |
|
|
|
474 |
|
|
|
475 |
|
|
|
476 |
</div> |
|
|
477 |
</div> |
|
|
478 |
</div> |
|
|
479 |
</div> |
|
|
480 |
|
|
|
481 |
<script src="../assets/vendor/prettify/prettify-min.js"></script> |
|
|
482 |
<script>prettyPrint();</script> |
|
|
483 |
|
|
|
484 |
<script> |
|
|
485 |
YUI.Env.Tests = { |
|
|
486 |
examples: [], |
|
|
487 |
project: '../assets', |
|
|
488 |
assets: '../assets/uploader', |
|
|
489 |
name: 'uploader-multiple', |
|
|
490 |
title: 'Simple Multiple Files Uploader with Progress Tracking', |
|
|
491 |
newWindow: '', |
|
|
492 |
auto: false |
|
|
493 |
}; |
|
|
494 |
YUI.Env.Tests.examples.push('uploader-multiple'); |
|
|
495 |
YUI.Env.Tests.examples.push('uploader-dd'); |
|
|
496 |
YUI.Env.Tests.examples.push('uploader-data'); |
|
|
497 |
|
|
|
498 |
</script> |
|
|
499 |
<script src="../assets/yui/test-runner.js"></script> |
|
|
500 |
|
|
|
501 |
|
|
|
502 |
|
|
|
503 |
</body> |
|
|
504 |
</html> |