class_plupload.Uploader.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2. <html>
  3. <head>
  4. <title>Class: plupload.Uploader</title>
  5. <meta name="generator" content="MoxieDoc" />
  6. <link rel="stylesheet" type="text/css" href="css/reset.css" />
  7. <link rel="stylesheet" type="text/css" href="css/grids.css" />
  8. <link rel="stylesheet" type="text/css" href="css/general.css" />
  9. <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  10. <script type="text/javascript">
  11. google.load("jquery", "1.3");
  12. </script>
  13. <script type="text/javascript" src="js/jquery.treeview.min.js"></script>
  14. <script type="text/javascript" src="js/general.js"></script>
  15. </head>
  16. <body>
  17. <div class="classDetailsContent">
  18. <h1>plupload.Uploader</h1>
  19. <table class="classDetails">
  20. <tr>
  21. <td class="first">Namespace</td>
  22. <td class="last">plupload</td>
  23. </tr>
  24. <tr>
  25. <td class="first">Class</td>
  26. <td class="last">Uploader</td>
  27. </tr>
  28. </table>
  29. <div class="classDescription">Uploader class, an instance of this class will be created for each upload field.
  30. </div>
  31. <h4>Example</h4>
  32. <pre class="brush: js;">var uploader = new plupload.Uploader({
  33. runtimes : 'gears,html5,flash',
  34. browse_button : 'button_id'
  35. });
  36. uploader.bind('Init', function(up) {
  37. alert('Supports drag/drop: ' + (!!up.features.dragdrop));
  38. });
  39. uploader.bind('FilesAdded', function(up, files) {
  40. alert('Selected files: ' + files.length);
  41. });
  42. uploader.bind('QueueChanged', function(up) {
  43. alert('Queued files: ' + uploader.files.length);
  44. });
  45. uploader.init();</pre>
  46. <div class="summaryLists">
  47. <h2>Public Properties</h2>
  48. <table class="Properties summary">
  49. <thead>
  50. <tr>
  51. <th>Property</th>
  52. <th>Defined By</th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <tr>
  57. <td class="first">
  58. <div>
  59. <a class="memberName" href="class_plupload.Uploader.html#features">features</a> : Object</div>
  60. <div class="summary">Map of features that are available for the uploader runtime.</div>
  61. </td>
  62. <td class="last">Uploader</td>
  63. </tr>
  64. <tr class="even">
  65. <td class="first">
  66. <div>
  67. <a class="memberName" href="class_plupload.Uploader.html#files">files</a> : Array</div>
  68. <div class="summary">Current upload queue, an array of File instances.</div>
  69. </td>
  70. <td class="last">Uploader</td>
  71. </tr>
  72. <tr>
  73. <td class="first">
  74. <div>
  75. <a class="memberName" href="class_plupload.Uploader.html#id">id</a> : String</div>
  76. <div class="summary">Unique id for the Uploader instance.</div>
  77. </td>
  78. <td class="last">Uploader</td>
  79. </tr>
  80. <tr class="even">
  81. <td class="first">
  82. <div>
  83. <a class="memberName" href="class_plupload.Uploader.html#runtime">runtime</a> : String</div>
  84. <div class="summary">Current runtime name.</div>
  85. </td>
  86. <td class="last">Uploader</td>
  87. </tr>
  88. <tr>
  89. <td class="first">
  90. <div>
  91. <a class="memberName" href="class_plupload.Uploader.html#settings">settings</a> : Object</div>
  92. <div class="summary">Object with name/value settings.</div>
  93. </td>
  94. <td class="last">Uploader</td>
  95. </tr>
  96. <tr class="even">
  97. <td class="first">
  98. <div>
  99. <a class="memberName" href="class_plupload.Uploader.html#state">state</a> : Number</div>
  100. <div class="summary">Current state of the total uploading progress.</div>
  101. </td>
  102. <td class="last">Uploader</td>
  103. </tr>
  104. <tr>
  105. <td class="first">
  106. <div>
  107. <a class="memberName" href="class_plupload.Uploader.html#total">total</a> : <a href="class_plupload.QueueProgress.html">QueueProgress</a>
  108. </div>
  109. <div class="summary">Total progess information.</div>
  110. </td>
  111. <td class="last">Uploader</td>
  112. </tr>
  113. </tbody>
  114. </table>
  115. <h2>Public Methods</h2>
  116. <table class="Methods summary">
  117. <thead>
  118. <tr>
  119. <th>Method</th>
  120. <th>Defined By</th>
  121. </tr>
  122. </thead>
  123. <tbody>
  124. <tr>
  125. <td class="first">
  126. <div>
  127. <a class="memberName" href="class_plupload.Uploader.html#Uploader">Uploader</a>(settings:Object)</div>
  128. <div class="summary">Constructs a new uploader instance.</div>
  129. </td>
  130. <td class="last">Uploader</td>
  131. </tr>
  132. <tr class="even">
  133. <td class="first">
  134. <div>
  135. <a class="memberName" href="class_plupload.Uploader.html#bind">bind</a>(name:String, func:function, scope:Object):void</div>
  136. <div class="summary">Adds an event listener by name.</div>
  137. </td>
  138. <td class="last">Uploader</td>
  139. </tr>
  140. <tr>
  141. <td class="first">
  142. <div>
  143. <a class="memberName" href="class_plupload.Uploader.html#destroy">destroy</a>():void</div>
  144. <div class="summary">Destroys Plupload instance and cleans after itself.</div>
  145. </td>
  146. <td class="last">Uploader</td>
  147. </tr>
  148. <tr class="even">
  149. <td class="first">
  150. <div>
  151. <a class="memberName" href="class_plupload.Uploader.html#getFile">getFile</a>(id:String):<a href="class_plupload.File.html">File</a>
  152. </div>
  153. <div class="summary">Returns the specified file object by id.</div>
  154. </td>
  155. <td class="last">Uploader</td>
  156. </tr>
  157. <tr>
  158. <td class="first">
  159. <div>
  160. <a class="memberName" href="class_plupload.Uploader.html#init">init</a>():void</div>
  161. <div class="summary">Initializes the Uploader instance and adds internal event listeners.</div>
  162. </td>
  163. <td class="last">Uploader</td>
  164. </tr>
  165. <tr class="even">
  166. <td class="first">
  167. <div>
  168. <a class="memberName" href="class_plupload.Uploader.html#refresh">refresh</a>():void</div>
  169. <div class="summary">Refreshes the upload instance by dispatching out a refresh event to all runtimes.</div>
  170. </td>
  171. <td class="last">Uploader</td>
  172. </tr>
  173. <tr>
  174. <td class="first">
  175. <div>
  176. <a class="memberName" href="class_plupload.Uploader.html#removeFile">removeFile</a>(file:<a href="class_plupload.File.html">File</a>):void</div>
  177. <div class="summary">Removes a specific file.</div>
  178. </td>
  179. <td class="last">Uploader</td>
  180. </tr>
  181. <tr class="even">
  182. <td class="first">
  183. <div>
  184. <a class="memberName" href="class_plupload.Uploader.html#splice">splice</a>(start:Number, length:Number):Array</div>
  185. <div class="summary">Removes part of the queue and returns the files removed.</div>
  186. </td>
  187. <td class="last">Uploader</td>
  188. </tr>
  189. <tr>
  190. <td class="first">
  191. <div>
  192. <a class="memberName" href="class_plupload.Uploader.html#start">start</a>():void</div>
  193. <div class="summary">Starts uploading the queued files.</div>
  194. </td>
  195. <td class="last">Uploader</td>
  196. </tr>
  197. <tr class="even">
  198. <td class="first">
  199. <div>
  200. <a class="memberName" href="class_plupload.Uploader.html#stop">stop</a>():void</div>
  201. <div class="summary">Stops the upload of the queued files.</div>
  202. </td>
  203. <td class="last">Uploader</td>
  204. </tr>
  205. <tr>
  206. <td class="first">
  207. <div>
  208. <a class="memberName" href="class_plupload.Uploader.html#trigger">trigger</a>(name:String, Multiple:Object..):void</div>
  209. <div class="summary">Dispatches the specified event name and it's arguments to all listeners.</div>
  210. </td>
  211. <td class="last">Uploader</td>
  212. </tr>
  213. <tr class="even">
  214. <td class="first">
  215. <div>
  216. <a class="memberName" href="class_plupload.Uploader.html#unbind">unbind</a>(name:String, func:function):void</div>
  217. <div class="summary">Removes the specified event listener.</div>
  218. </td>
  219. <td class="last">Uploader</td>
  220. </tr>
  221. <tr>
  222. <td class="first">
  223. <div>
  224. <a class="memberName" href="class_plupload.Uploader.html#unbindAll">unbindAll</a>():void</div>
  225. <div class="summary">Removes all event listeners.</div>
  226. </td>
  227. <td class="last">Uploader</td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. <h2>Public Events</h2>
  232. <table class="Events summary">
  233. <thead>
  234. <tr>
  235. <th>Event</th>
  236. <th>Defined By</th>
  237. </tr>
  238. </thead>
  239. <tbody>
  240. <tr>
  241. <td class="first">
  242. <div>
  243. <a class="memberName" href="class_plupload.Uploader.html#BeforeUpload">BeforeUpload</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>)</div>
  244. <div class="summary">Fires when just before a file is uploaded.</div>
  245. </td>
  246. <td class="last">Uploader</td>
  247. </tr>
  248. <tr class="even">
  249. <td class="first">
  250. <div>
  251. <a class="memberName" href="class_plupload.Uploader.html#ChunkUploaded">ChunkUploaded</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>, response:Object)</div>
  252. <div class="summary">Fires when file chunk is uploaded.</div>
  253. </td>
  254. <td class="last">Uploader</td>
  255. </tr>
  256. <tr>
  257. <td class="first">
  258. <div>
  259. <a class="memberName" href="class_plupload.Uploader.html#Destroy">Destroy</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</div>
  260. <div class="summary">Fires when destroy method is called.</div>
  261. </td>
  262. <td class="last">Uploader</td>
  263. </tr>
  264. <tr class="even">
  265. <td class="first">
  266. <div>
  267. <a class="memberName" href="class_plupload.Uploader.html#Error">Error</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, error:Object)</div>
  268. <div class="summary">Fires when a error occurs.</div>
  269. </td>
  270. <td class="last">Uploader</td>
  271. </tr>
  272. <tr>
  273. <td class="first">
  274. <div>
  275. <a class="memberName" href="class_plupload.Uploader.html#FilesAdded">FilesAdded</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, files:Array)</div>
  276. <div class="summary">Fires while when the user selects files to upload.</div>
  277. </td>
  278. <td class="last">Uploader</td>
  279. </tr>
  280. <tr class="even">
  281. <td class="first">
  282. <div>
  283. <a class="memberName" href="class_plupload.Uploader.html#FilesRemoved">FilesRemoved</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, files:Array)</div>
  284. <div class="summary">Fires while a file was removed from queue.</div>
  285. </td>
  286. <td class="last">Uploader</td>
  287. </tr>
  288. <tr>
  289. <td class="first">
  290. <div>
  291. <a class="memberName" href="class_plupload.Uploader.html#FileUploaded">FileUploaded</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>, response:Object)</div>
  292. <div class="summary">Fires when a file is successfully uploaded.</div>
  293. </td>
  294. <td class="last">Uploader</td>
  295. </tr>
  296. <tr class="even">
  297. <td class="first">
  298. <div>
  299. <a class="memberName" href="class_plupload.Uploader.html#Init">Init</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</div>
  300. <div class="summary">Fires when the current RunTime has been initialized.</div>
  301. </td>
  302. <td class="last">Uploader</td>
  303. </tr>
  304. <tr>
  305. <td class="first">
  306. <div>
  307. <a class="memberName" href="class_plupload.Uploader.html#PostInit">PostInit</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</div>
  308. <div class="summary">Fires after the init event incase you need to perform actions there.</div>
  309. </td>
  310. <td class="last">Uploader</td>
  311. </tr>
  312. <tr class="even">
  313. <td class="first">
  314. <div>
  315. <a class="memberName" href="class_plupload.Uploader.html#QueueChanged">QueueChanged</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</div>
  316. <div class="summary">Fires when the file queue is changed.</div>
  317. </td>
  318. <td class="last">Uploader</td>
  319. </tr>
  320. <tr>
  321. <td class="first">
  322. <div>
  323. <a class="memberName" href="class_plupload.Uploader.html#Refresh">Refresh</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</div>
  324. <div class="summary">Fires when the silverlight/flash or other shim needs to move.</div>
  325. </td>
  326. <td class="last">Uploader</td>
  327. </tr>
  328. <tr class="even">
  329. <td class="first">
  330. <div>
  331. <a class="memberName" href="class_plupload.Uploader.html#StateChanged">StateChanged</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</div>
  332. <div class="summary">Fires when the overall state is being changed for the upload queue.</div>
  333. </td>
  334. <td class="last">Uploader</td>
  335. </tr>
  336. <tr>
  337. <td class="first">
  338. <div>
  339. <a class="memberName" href="class_plupload.Uploader.html#UploadComplete">UploadComplete</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, files:Array)</div>
  340. <div class="summary">Fires when all files in a queue are uploaded.</div>
  341. </td>
  342. <td class="last">Uploader</td>
  343. </tr>
  344. <tr class="even">
  345. <td class="first">
  346. <div>
  347. <a class="memberName" href="class_plupload.Uploader.html#UploadFile">UploadFile</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>)</div>
  348. <div class="summary">Fires when a file is to be uploaded by the runtime.</div>
  349. </td>
  350. <td class="last">Uploader</td>
  351. </tr>
  352. <tr>
  353. <td class="first">
  354. <div>
  355. <a class="memberName" href="class_plupload.Uploader.html#UploadProgress">UploadProgress</a>(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>)</div>
  356. <div class="summary">Fires while a file is being uploaded.</div>
  357. </td>
  358. <td class="last">Uploader</td>
  359. </tr>
  360. </tbody>
  361. </table>
  362. </div>
  363. <div class="detailsList">
  364. <div class="details">
  365. <h2>Property details</h2>
  366. <div class="memberDetails" id="features">
  367. <h3>features<span class="memberType">property</span>
  368. </h3>
  369. <code class="syntax">public features : Object</code>
  370. <div class="memberDescription">Map of features that are available for the uploader runtime. Features will be filled
  371. before the init event is called, these features can then be used to alter the UI for the end user.
  372. Some of the current features that might be in this map is: dragdrop, chunks, jpgresize, pngresize.
  373. </div>
  374. </div>
  375. <div class="memberDetails" id="files">
  376. <h3>files<span class="memberType">property</span>
  377. </h3>
  378. <code class="syntax">public files : Array</code>
  379. <div class="memberDescription">Current upload queue, an array of File instances.
  380. </div>
  381. <h4>See Also</h4>
  382. <ul class="see">
  383. <li>
  384. <a href="class_plupload.File.html">File</a>
  385. </li>
  386. </ul>
  387. </div>
  388. <div class="memberDetails" id="id">
  389. <h3>id<span class="memberType">property</span>
  390. </h3>
  391. <code class="syntax">public id : String</code>
  392. <div class="memberDescription">Unique id for the Uploader instance.
  393. </div>
  394. </div>
  395. <div class="memberDetails" id="runtime">
  396. <h3>runtime<span class="memberType">property</span>
  397. </h3>
  398. <code class="syntax">public runtime : String</code>
  399. <div class="memberDescription">Current runtime name.
  400. </div>
  401. </div>
  402. <div class="memberDetails" id="settings">
  403. <h3>settings<span class="memberType">property</span>
  404. </h3>
  405. <code class="syntax">public settings : Object</code>
  406. <div class="memberDescription">Object with name/value settings.
  407. </div>
  408. </div>
  409. <div class="memberDetails" id="state">
  410. <h3>state<span class="memberType">property</span>
  411. </h3>
  412. <code class="syntax">public state : Number</code>
  413. <div class="memberDescription">Current state of the total uploading progress. This one can either be plupload.STARTED or plupload.STOPPED.
  414. These states are controlled by the stop/start methods. The default value is STOPPED.
  415. </div>
  416. </div>
  417. <div class="memberDetails last" id="total">
  418. <h3>total<span class="memberType">property</span>
  419. </h3>
  420. <code class="syntax">public total : <a href="class_plupload.QueueProgress.html">QueueProgress</a>
  421. </code>
  422. <div class="memberDescription">Total progess information. How many files has been uploaded, total percent etc.
  423. </div>
  424. </div>
  425. </div>
  426. <div class="details">
  427. <h2>Method details</h2>
  428. <div class="memberDetails" id="Uploader">
  429. <h3>Uploader<span class="memberType">constructor</span>
  430. </h3>
  431. <code class="syntax">public
  432. function Uploader(settings:Object)</code>
  433. <div class="memberDescription">Constructs a new uploader instance.
  434. </div>
  435. <h4>Parameters</h4>
  436. <table class="params">
  437. <tr>
  438. <td class="first">settings:Object</td>
  439. <td class="last">Initialization settings, to be used by the uploader instance and runtimes.</td>
  440. </tr>
  441. </table>
  442. </div>
  443. <div class="memberDetails" id="bind">
  444. <h3>bind<span class="memberType">method</span>
  445. </h3>
  446. <code class="syntax">public
  447. function bind(name:String, func:function, scope:Object):void</code>
  448. <div class="memberDescription">Adds an event listener by name.
  449. </div>
  450. <h4>Parameters</h4>
  451. <table class="params">
  452. <tr>
  453. <td class="first">name:String</td>
  454. <td class="last">Event name to listen for.</td>
  455. </tr>
  456. <tr>
  457. <td class="first">func:function</td>
  458. <td class="last">Function to call ones the event gets fired.</td>
  459. </tr>
  460. <tr>
  461. <td class="first">scope:Object</td>
  462. <td class="last">Optional scope to execute the specified function in.</td>
  463. </tr>
  464. </table>
  465. </div>
  466. <div class="memberDetails" id="destroy">
  467. <h3>destroy<span class="memberType">method</span>
  468. </h3>
  469. <code class="syntax">public
  470. function destroy():void</code>
  471. <div class="memberDescription">Destroys Plupload instance and cleans after itself.
  472. </div>
  473. </div>
  474. <div class="memberDetails" id="getFile">
  475. <h3>getFile<span class="memberType">method</span>
  476. </h3>
  477. <code class="syntax">public
  478. function getFile(id:String):<a href="class_plupload.File.html">File</a>
  479. </code>
  480. <div class="memberDescription">Returns the specified file object by id.
  481. </div>
  482. <h4>Parameters</h4>
  483. <table class="params">
  484. <tr>
  485. <td class="first">id:String</td>
  486. <td class="last">File id to look for.</td>
  487. </tr>
  488. </table>
  489. <h4>Returns</h4>
  490. <div class="returns">
  491. <a href="class_plupload.File.html">File</a> - File object or undefined if it wasn't found;</div>
  492. </div>
  493. <div class="memberDetails" id="init">
  494. <h3>init<span class="memberType">method</span>
  495. </h3>
  496. <code class="syntax">public
  497. function init():void</code>
  498. <div class="memberDescription">Initializes the Uploader instance and adds internal event listeners.
  499. </div>
  500. </div>
  501. <div class="memberDetails" id="refresh">
  502. <h3>refresh<span class="memberType">method</span>
  503. </h3>
  504. <code class="syntax">public
  505. function refresh():void</code>
  506. <div class="memberDescription">Refreshes the upload instance by dispatching out a refresh event to all runtimes.
  507. This would for example reposition flash/silverlight shims on the page.
  508. </div>
  509. </div>
  510. <div class="memberDetails" id="removeFile">
  511. <h3>removeFile<span class="memberType">method</span>
  512. </h3>
  513. <code class="syntax">public
  514. function removeFile(file:<a href="class_plupload.File.html">File</a>):void</code>
  515. <div class="memberDescription">Removes a specific file.
  516. </div>
  517. <h4>Parameters</h4>
  518. <table class="params">
  519. <tr>
  520. <td class="first">file:<a href="class_plupload.File.html">File</a>
  521. </td>
  522. <td class="last">File to remove from queue.</td>
  523. </tr>
  524. </table>
  525. </div>
  526. <div class="memberDetails" id="splice">
  527. <h3>splice<span class="memberType">method</span>
  528. </h3>
  529. <code class="syntax">public
  530. function splice(start:Number, length:Number):Array</code>
  531. <div class="memberDescription">Removes part of the queue and returns the files removed. This will also trigger the FilesRemoved and QueueChanged events.
  532. </div>
  533. <h4>Parameters</h4>
  534. <table class="params">
  535. <tr>
  536. <td class="first">start:Number</td>
  537. <td class="last">(Optional) Start index to remove from.</td>
  538. </tr>
  539. <tr>
  540. <td class="first">length:Number</td>
  541. <td class="last">(Optional) Lengh of items to remove.</td>
  542. </tr>
  543. </table>
  544. <h4>Returns</h4>
  545. <div class="returns">Array - Array of files that was removed.</div>
  546. </div>
  547. <div class="memberDetails" id="start">
  548. <h3>start<span class="memberType">method</span>
  549. </h3>
  550. <code class="syntax">public
  551. function start():void</code>
  552. <div class="memberDescription">Starts uploading the queued files.
  553. </div>
  554. </div>
  555. <div class="memberDetails" id="stop">
  556. <h3>stop<span class="memberType">method</span>
  557. </h3>
  558. <code class="syntax">public
  559. function stop():void</code>
  560. <div class="memberDescription">Stops the upload of the queued files.
  561. </div>
  562. </div>
  563. <div class="memberDetails" id="trigger">
  564. <h3>trigger<span class="memberType">method</span>
  565. </h3>
  566. <code class="syntax">public
  567. function trigger(name:String, Multiple:Object..):void</code>
  568. <div class="memberDescription">Dispatches the specified event name and it's arguments to all listeners.
  569. </div>
  570. <h4>Parameters</h4>
  571. <table class="params">
  572. <tr>
  573. <td class="first">name:String</td>
  574. <td class="last">Event name to fire.</td>
  575. </tr>
  576. <tr>
  577. <td class="first">Multiple:Object..</td>
  578. <td class="last">arguments to pass along to the listener functions.</td>
  579. </tr>
  580. </table>
  581. </div>
  582. <div class="memberDetails" id="unbind">
  583. <h3>unbind<span class="memberType">method</span>
  584. </h3>
  585. <code class="syntax">public
  586. function unbind(name:String, func:function):void</code>
  587. <div class="memberDescription">Removes the specified event listener.
  588. </div>
  589. <h4>Parameters</h4>
  590. <table class="params">
  591. <tr>
  592. <td class="first">name:String</td>
  593. <td class="last">Name of event to remove.</td>
  594. </tr>
  595. <tr>
  596. <td class="first">func:function</td>
  597. <td class="last">Function to remove from listener.</td>
  598. </tr>
  599. </table>
  600. </div>
  601. <div class="memberDetails last" id="unbindAll">
  602. <h3>unbindAll<span class="memberType">method</span>
  603. </h3>
  604. <code class="syntax">public
  605. function unbindAll():void</code>
  606. <div class="memberDescription">Removes all event listeners.
  607. </div>
  608. </div>
  609. </div>
  610. <div class="details">
  611. <h2>Event details</h2>
  612. <div class="memberDetails" id="BeforeUpload">
  613. <h3>BeforeUpload<span class="memberType">event</span>
  614. </h3>
  615. <code class="syntax">public
  616. event BeforeUpload(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>)</code>
  617. <div class="memberDescription">Fires when just before a file is uploaded. This event enables you to override settings
  618. on the uploader instance before the file is uploaded.
  619. </div>
  620. <h4>Parameters</h4>
  621. <table class="params">
  622. <tr>
  623. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  624. </td>
  625. <td class="last">Uploader instance sending the event.</td>
  626. </tr>
  627. <tr>
  628. <td class="first">file:<a href="class_plupload.File.html">File</a>
  629. </td>
  630. <td class="last">File to be uploaded.</td>
  631. </tr>
  632. </table>
  633. </div>
  634. <div class="memberDetails" id="ChunkUploaded">
  635. <h3>ChunkUploaded<span class="memberType">event</span>
  636. </h3>
  637. <code class="syntax">public
  638. event ChunkUploaded(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>, response:Object)</code>
  639. <div class="memberDescription">Fires when file chunk is uploaded.
  640. </div>
  641. <h4>Parameters</h4>
  642. <table class="params">
  643. <tr>
  644. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  645. </td>
  646. <td class="last">Uploader instance sending the event.</td>
  647. </tr>
  648. <tr>
  649. <td class="first">file:<a href="class_plupload.File.html">File</a>
  650. </td>
  651. <td class="last">File that the chunk was uploaded for.</td>
  652. </tr>
  653. <tr>
  654. <td class="first">response:Object</td>
  655. <td class="last">Object with response properties.</td>
  656. </tr>
  657. </table>
  658. </div>
  659. <div class="memberDetails" id="Destroy">
  660. <h3>Destroy<span class="memberType">event</span>
  661. </h3>
  662. <code class="syntax">public
  663. event Destroy(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</code>
  664. <div class="memberDescription">Fires when destroy method is called.
  665. </div>
  666. <h4>Parameters</h4>
  667. <table class="params">
  668. <tr>
  669. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  670. </td>
  671. <td class="last">Uploader instance sending the event.</td>
  672. </tr>
  673. </table>
  674. </div>
  675. <div class="memberDetails" id="Error">
  676. <h3>Error<span class="memberType">event</span>
  677. </h3>
  678. <code class="syntax">public
  679. event Error(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, error:Object)</code>
  680. <div class="memberDescription">Fires when a error occurs.
  681. </div>
  682. <h4>Parameters</h4>
  683. <table class="params">
  684. <tr>
  685. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  686. </td>
  687. <td class="last">Uploader instance sending the event.</td>
  688. </tr>
  689. <tr>
  690. <td class="first">error:Object</td>
  691. <td class="last">Contains code, message and sometimes file and other details.</td>
  692. </tr>
  693. </table>
  694. </div>
  695. <div class="memberDetails" id="FilesAdded">
  696. <h3>FilesAdded<span class="memberType">event</span>
  697. </h3>
  698. <code class="syntax">public
  699. event FilesAdded(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, files:Array)</code>
  700. <div class="memberDescription">Fires while when the user selects files to upload.
  701. </div>
  702. <h4>Parameters</h4>
  703. <table class="params">
  704. <tr>
  705. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  706. </td>
  707. <td class="last">Uploader instance sending the event.</td>
  708. </tr>
  709. <tr>
  710. <td class="first">files:Array</td>
  711. <td class="last">Array of file objects that was added to queue/selected by the user.</td>
  712. </tr>
  713. </table>
  714. </div>
  715. <div class="memberDetails" id="FilesRemoved">
  716. <h3>FilesRemoved<span class="memberType">event</span>
  717. </h3>
  718. <code class="syntax">public
  719. event FilesRemoved(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, files:Array)</code>
  720. <div class="memberDescription">Fires while a file was removed from queue.
  721. </div>
  722. <h4>Parameters</h4>
  723. <table class="params">
  724. <tr>
  725. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  726. </td>
  727. <td class="last">Uploader instance sending the event.</td>
  728. </tr>
  729. <tr>
  730. <td class="first">files:Array</td>
  731. <td class="last">Array of files that got removed.</td>
  732. </tr>
  733. </table>
  734. </div>
  735. <div class="memberDetails" id="FileUploaded">
  736. <h3>FileUploaded<span class="memberType">event</span>
  737. </h3>
  738. <code class="syntax">public
  739. event FileUploaded(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>, response:Object)</code>
  740. <div class="memberDescription">Fires when a file is successfully uploaded.
  741. </div>
  742. <h4>Parameters</h4>
  743. <table class="params">
  744. <tr>
  745. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  746. </td>
  747. <td class="last">Uploader instance sending the event.</td>
  748. </tr>
  749. <tr>
  750. <td class="first">file:<a href="class_plupload.File.html">File</a>
  751. </td>
  752. <td class="last">File that was uploaded.</td>
  753. </tr>
  754. <tr>
  755. <td class="first">response:Object</td>
  756. <td class="last">Object with response properties.</td>
  757. </tr>
  758. </table>
  759. </div>
  760. <div class="memberDetails" id="Init">
  761. <h3>Init<span class="memberType">event</span>
  762. </h3>
  763. <code class="syntax">public
  764. event Init(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</code>
  765. <div class="memberDescription">Fires when the current RunTime has been initialized.
  766. </div>
  767. <h4>Parameters</h4>
  768. <table class="params">
  769. <tr>
  770. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  771. </td>
  772. <td class="last">Uploader instance sending the event.</td>
  773. </tr>
  774. </table>
  775. </div>
  776. <div class="memberDetails" id="PostInit">
  777. <h3>PostInit<span class="memberType">event</span>
  778. </h3>
  779. <code class="syntax">public
  780. event PostInit(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</code>
  781. <div class="memberDescription">Fires after the init event incase you need to perform actions there.
  782. </div>
  783. <h4>Parameters</h4>
  784. <table class="params">
  785. <tr>
  786. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  787. </td>
  788. <td class="last">Uploader instance sending the event.</td>
  789. </tr>
  790. </table>
  791. </div>
  792. <div class="memberDetails" id="QueueChanged">
  793. <h3>QueueChanged<span class="memberType">event</span>
  794. </h3>
  795. <code class="syntax">public
  796. event QueueChanged(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</code>
  797. <div class="memberDescription">Fires when the file queue is changed. In other words when files are added/removed to the files array of the uploader instance.
  798. </div>
  799. <h4>Parameters</h4>
  800. <table class="params">
  801. <tr>
  802. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  803. </td>
  804. <td class="last">Uploader instance sending the event.</td>
  805. </tr>
  806. </table>
  807. </div>
  808. <div class="memberDetails" id="Refresh">
  809. <h3>Refresh<span class="memberType">event</span>
  810. </h3>
  811. <code class="syntax">public
  812. event Refresh(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</code>
  813. <div class="memberDescription">Fires when the silverlight/flash or other shim needs to move.
  814. </div>
  815. <h4>Parameters</h4>
  816. <table class="params">
  817. <tr>
  818. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  819. </td>
  820. <td class="last">Uploader instance sending the event.</td>
  821. </tr>
  822. </table>
  823. </div>
  824. <div class="memberDetails" id="StateChanged">
  825. <h3>StateChanged<span class="memberType">event</span>
  826. </h3>
  827. <code class="syntax">public
  828. event StateChanged(uploader:<a href="class_plupload.Uploader.html">Uploader</a>)</code>
  829. <div class="memberDescription">Fires when the overall state is being changed for the upload queue.
  830. </div>
  831. <h4>Parameters</h4>
  832. <table class="params">
  833. <tr>
  834. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  835. </td>
  836. <td class="last">Uploader instance sending the event.</td>
  837. </tr>
  838. </table>
  839. </div>
  840. <div class="memberDetails" id="UploadComplete">
  841. <h3>UploadComplete<span class="memberType">event</span>
  842. </h3>
  843. <code class="syntax">public
  844. event UploadComplete(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, files:Array)</code>
  845. <div class="memberDescription">Fires when all files in a queue are uploaded.
  846. </div>
  847. <h4>Parameters</h4>
  848. <table class="params">
  849. <tr>
  850. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  851. </td>
  852. <td class="last">Uploader instance sending the event.</td>
  853. </tr>
  854. <tr>
  855. <td class="first">files:Array</td>
  856. <td class="last">Array of file objects that was added to queue/selected by the user.</td>
  857. </tr>
  858. </table>
  859. </div>
  860. <div class="memberDetails" id="UploadFile">
  861. <h3>UploadFile<span class="memberType">event</span>
  862. </h3>
  863. <code class="syntax">public
  864. event UploadFile(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>)</code>
  865. <div class="memberDescription">Fires when a file is to be uploaded by the runtime.
  866. </div>
  867. <h4>Parameters</h4>
  868. <table class="params">
  869. <tr>
  870. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  871. </td>
  872. <td class="last">Uploader instance sending the event.</td>
  873. </tr>
  874. <tr>
  875. <td class="first">file:<a href="class_plupload.File.html">File</a>
  876. </td>
  877. <td class="last">File to be uploaded.</td>
  878. </tr>
  879. </table>
  880. </div>
  881. <div class="memberDetails last" id="UploadProgress">
  882. <h3>UploadProgress<span class="memberType">event</span>
  883. </h3>
  884. <code class="syntax">public
  885. event UploadProgress(uploader:<a href="class_plupload.Uploader.html">Uploader</a>, file:<a href="class_plupload.File.html">File</a>)</code>
  886. <div class="memberDescription">Fires while a file is being uploaded. Use this event to update the current file upload progress.
  887. </div>
  888. <h4>Parameters</h4>
  889. <table class="params">
  890. <tr>
  891. <td class="first">uploader:<a href="class_plupload.Uploader.html">Uploader</a>
  892. </td>
  893. <td class="last">Uploader instance sending the event.</td>
  894. </tr>
  895. <tr>
  896. <td class="first">file:<a href="class_plupload.File.html">File</a>
  897. </td>
  898. <td class="last">File that is currently being uploaded.</td>
  899. </tr>
  900. </table>
  901. </div>
  902. </div>
  903. </div>
  904. </div>
  905. </body>
  906. </html>