2
YUI 3.10.3 (build 2fb5187)
3
Copyright 2013 Yahoo! Inc. All rights reserved.
4
Licensed under the BSD License.
5
http://yuilibrary.com/license/
8
YUI.add('uploader-flash', function (Y, NAME) {
11
* This module provides a UI for file selection and multiple file upload capability using
12
* Flash as a transport engine.
13
* The supported features include: automatic upload queue management, upload progress
14
* tracking, file filtering, server response retrieval and error reporting.
16
* @module uploader-flash
19
// Shorthands for external modules
20
var substitute = Y.Lang.sub,
21
UploaderQueue = Y.Uploader.Queue;
25
* This module provides a UI for file selection and multiple file upload capability
26
* using Flash as a transport engine.
27
* @class UploaderFlash
29
* @param {Object} config Configuration object.
33
function UploaderFlash() {
34
UploaderFlash.superclass.constructor.apply ( this, arguments );
39
Y.UploaderFlash = Y.extend(UploaderFlash, Y.Widget, {
42
* Stored value of the current button state (based on
43
* mouse events dispatched by the Flash player)
44
* @property _buttonState
51
* Stored value of the current button focus state (based
52
* on keyboard and mouse events).
53
* @property _buttonFocus
60
* Stored value of the unique id for the container that holds the
63
* @property _swfContainerId
67
_swfContainerId: null,
70
* Stored reference to the instance of SWF used to host the
73
* @property _swfReference
80
* Stored reference to the instance of Uploader.Queue used to manage
81
* the upload process. This is a read-only property that only exists
82
* during an active upload process. Only one queue can be active at
83
* a time; if an upload start is attempted while a queue is active,
87
* @type {Y.Uploader.Queue}
92
* Stored event bindings for keyboard navigation to and from the uploader.
94
* @property _tabElementBindings
98
_tabElementBindings: null,
102
* Construction logic executed during UploaderFlash instantiation.
104
* @method initializer
107
initializer : function () {
109
// Assign protected variable values
110
this._swfContainerId = Y.guid("uploader");
111
this._swfReference = null;
113
this._buttonState = "up";
114
this._buttonFocus = null;
115
this._tabElementBindings = null;
118
// Publish available events
121
* Signals that files have been selected.
124
* @param event {Event} The event object for the `fileselect` with the
128
* <dd>An `Array` of files selected by the user, encapsulated
129
* in Y.FileFlash objects.</dd>
132
this.publish("fileselect");
135
* Signals that an upload of multiple files has been started.
138
* @param event {Event} The event object for the `uploadstart`.
140
this.publish("uploadstart");
143
* Signals that an upload of a specific file has started.
145
* @event fileuploadstart
146
* @param event {Event} The event object for the `fileuploadstart` with the
150
* <dd>A reference to the Y.File that dispatched the event.</dd>
151
* <dt>originEvent</dt>
152
* <dd>The original event dispatched by Y.File.</dd>
155
this.publish("fileuploadstart");
158
* Reports on upload progress of a specific file.
160
* @event uploadprogress
161
* @param event {Event} The event object for the `uploadprogress` with the
164
* <dt>bytesLoaded</dt>
165
* <dd>The number of bytes of the file that has been uploaded</dd>
166
* <dt>bytesTotal</dt>
167
* <dd>The total number of bytes in the file</dd>
168
* <dt>percentLoaded</dt>
169
* <dd>The fraction of the file that has been uploaded, out of 100</dd>
170
* <dt>originEvent</dt>
171
* <dd>The original event dispatched by the SWF uploader</dd>
174
this.publish("uploadprogress");
177
* Reports on the total upload progress of the file list.
179
* @event totaluploadprogress
180
* @param event {Event} The event object for the `totaluploadprogress` with the
183
* <dt>bytesLoaded</dt>
184
* <dd>The number of bytes of the file list that has been uploaded</dd>
185
* <dt>bytesTotal</dt>
186
* <dd>The total number of bytes in the file list</dd>
187
* <dt>percentLoaded</dt>
188
* <dd>The fraction of the file list that has been uploaded, out of 100</dd>
191
this.publish("totaluploadprogress");
194
* Signals that a single file upload has been completed.
196
* @event uploadcomplete
197
* @param event {Event} The event object for the `uploadcomplete` with the
201
* <dd>The pointer to the instance of `Y.File` whose upload has been completed.</dd>
202
* <dt>originEvent</dt>
203
* <dd>The original event fired by the SWF Uploader</dd>
205
* <dd>Data returned by the server.</dd>
208
this.publish("uploadcomplete");
211
* Signals that the upload process of the entire file list has been completed.
213
* @event alluploadscomplete
214
* @param event {Event} The event object for the `alluploadscomplete`.
216
this.publish("alluploadscomplete");
219
* Signals that a error has occurred in a specific file's upload process.
222
* @param event {Event} The event object for the `uploaderror` with the
225
* <dt>originEvent</dt>
226
* <dd>The original error event fired by the SWF Uploader. </dd>
228
* <dd>The pointer at the instance of Y.FileFlash that returned the error.</dd>
230
* <dd>The source of the upload error, either "io" or "http"</dd>
232
* <dd>The message that accompanied the error. Corresponds to the text of
233
* the error in cases where source is "io", and to the HTTP status for
234
cases where source is "http".</dd>
237
this.publish("uploaderror");
240
* Signals that a mouse has begun hovering over the `Select Files` button.
243
* @param event {Event} The event object for the `mouseenter` event.
245
this.publish("mouseenter");
248
* Signals that a mouse has stopped hovering over the `Select Files` button.
251
* @param event {Event} The event object for the `mouseleave` event.
253
this.publish("mouseleave");
256
* Signals that a mouse button has been pressed over the `Select Files` button.
259
* @param event {Event} The event object for the `mousedown` event.
261
this.publish("mousedown");
264
* Signals that a mouse button has been released over the `Select Files` button.
267
* @param event {Event} The event object for the `mouseup` event.
269
this.publish("mouseup");
272
* Signals that a mouse has been clicked over the `Select Files` button.
275
* @param event {Event} The event object for the `click` event.
277
this.publish("click");
281
* Creates the DOM structure for the UploaderFlash.
282
* UploaderFlash's DOM structure consists of two layers: the base "Select Files"
283
* button that can be replaced by the developer's widget of choice; and a transparent
284
* Flash overlay positoned above the button that captures all input events.
285
* The `position` style attribute of the `boundingBox` of the `Uploader` widget
286
* is forced to be `relative`, in order to accommodate the Flash player overlay
287
* (which is `position`ed `absolute`ly).
292
renderUI : function () {
293
var boundingBox = this.get("boundingBox"),
294
contentBox = this.get('contentBox'),
295
selFilesButton = this.get("selectFilesButton"),
296
flashContainer = Y.Node.create(substitute(UploaderFlash.FLASH_CONTAINER, {
297
swfContainerId: this._swfContainerId
302
wmode: "transparent",
303
allowScriptAccess:"always",
304
allowNetworking:"all",
309
boundingBox.setStyle("position", "relative");
310
selFilesButton.setStyles({width: "100%", height: "100%"});
311
contentBox.append(selFilesButton);
312
contentBox.append(flashContainer);
314
this._swfReference = new Y.SWF(flashContainer, this.get("swfURL"), params);
318
* Binds handlers to the UploaderFlash UI events and propagates attribute
319
* values to the Flash player.
320
* The propagation of initial values is set to occur once the Flash player
321
* instance is ready (as indicated by the `swfReady` event.)
326
bindUI : function () {
328
this._swfReference.on("swfReady", function () {
329
this._setMultipleFiles();
330
this._setFileFilters();
331
this._triggerEnabled();
332
this._attachTabElements();
333
this.after("multipleFilesChange", this._setMultipleFiles, this);
334
this.after("fileFiltersChange", this._setFileFilters, this);
335
this.after("enabledChange", this._triggerEnabled, this);
336
this.after("tabElementsChange", this._attachTabElements);
339
this._swfReference.on("fileselect", this._updateFileList, this);
343
// this._swfReference.on("trace", function (ev) {console.log(ev.message);});
345
this._swfReference.on("mouseenter", function () {
346
this.fire("mouseenter");
347
this._setButtonClass("hover", true);
348
if (this._buttonState === "down") {
349
this._setButtonClass("active", true);
353
this._swfReference.on("mouseleave", function () {
354
this.fire("mouseleave");
355
this._setButtonClass("hover", false);
356
this._setButtonClass("active", false);
359
this._swfReference.on("mousedown", function () {
360
this.fire("mousedown");
361
this._buttonState = "down";
362
this._setButtonClass("active", true);
365
this._swfReference.on("mouseup", function () {
366
this.fire("mouseup");
367
this._buttonState = "up";
368
this._setButtonClass("active", false);
371
this._swfReference.on("click", function () {
373
this._buttonFocus = true;
374
this._setButtonClass("focus", true);
375
Y.one("body").focus();
376
this._swfReference._swf.focus();
381
* Attaches keyboard bindings to enabling tabbing to and from the instance of the Flash
382
* player in the Uploader widget. If the previous and next elements are specified, the
383
* keyboard bindings enable the user to tab from the `tabElements["from"]` node to the
384
* Flash-powered "Select Files" button, and to the `tabElements["to"]` node.
386
* @method _attachTabElements
388
* @param ev {Event} Optional event payload if called as a `tabElementsChange` handler.
390
_attachTabElements : function () {
391
if (this.get("tabElements") !== null && this.get("tabElements").from !== null && this.get("tabElements").to !== null) {
393
if (this._tabElementBindings !== null) {
394
this._tabElementBindings.from.detach();
395
this._tabElementBindings.to.detach();
396
this._tabElementBindings.tabback.detach();
397
this._tabElementBindings.tabforward.detach();
398
this._tabElementBindings.focus.detach();
399
this._tabElementBindings.blur.detach();
402
this._tabElementBindings = {};
405
var fromElement = Y.one(this.get("tabElements").from),
406
toElement = Y.one(this.get("tabElements").to);
409
this._tabElementBindings.from = fromElement.on("keydown", function (ev) {
410
if (ev.keyCode === 9 && !ev.shiftKey) {
412
this._swfReference._swf.setAttribute("tabindex", 0);
413
this._swfReference._swf.setAttribute("role", "button");
414
this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
415
this._swfReference._swf.focus();
419
this._tabElementBindings.to = toElement.on("keydown", function (ev) {
420
if (ev.keyCode === 9 && ev.shiftKey) {
422
this._swfReference._swf.setAttribute("tabindex", 0);
423
this._swfReference._swf.setAttribute("role", "button");
424
this._swfReference._swf.setAttribute("aria-label", this.get("selectButtonLabel"));
425
this._swfReference._swf.focus();
429
this._tabElementBindings.tabback = this._swfReference.on("tabback", function () {
430
this._swfReference._swf.blur();
431
setTimeout(function () {
436
this._tabElementBindings.tabforward = this._swfReference.on("tabforward", function () {
437
this._swfReference._swf.blur();
438
setTimeout(function () {
443
this._tabElementBindings.focus = this._swfReference._swf.on("focus", function () {
444
this._buttonFocus = true;
445
this._setButtonClass("focus", true);
448
this._tabElementBindings.blur = this._swfReference._swf.on("blur", function () {
449
this._buttonFocus = false;
450
this._setButtonClass("focus", false);
453
else if (this._tabElementBindings !== null) {
454
this._tabElementBindings.from.detach();
455
this._tabElementBindings.to.detach();
456
this._tabElementBindings.tabback.detach();
457
this._tabElementBindings.tabforward.detach();
458
this._tabElementBindings.focus.detach();
459
this._tabElementBindings.blur.detach();
465
* Adds or removes a specified state CSS class to the underlying uploader button.
467
* @method _setButtonClass
469
* @param state {String} The name of the state enumerated in `buttonClassNames` attribute
470
* from which to derive the needed class name.
471
* @param add {Boolean} A Boolean indicating whether to add or remove the class.
473
_setButtonClass : function (state, add) {
475
this.get("selectFilesButton").addClass(this.get("buttonClassNames")[state]);
478
this.get("selectFilesButton").removeClass(this.get("buttonClassNames")[state]);
484
* Syncs the state of the `fileFilters` attribute between the instance of UploaderFlash
485
* and the Flash player.
487
* @method _setFileFilters
490
_setFileFilters : function () {
491
if (this._swfReference && this.get("fileFilters").length > 0) {
492
this._swfReference.callSWF("setFileFilters", [this.get("fileFilters")]);
499
* Syncs the state of the `multipleFiles` attribute between this class
500
* and the Flash uploader.
502
* @method _setMultipleFiles
505
_setMultipleFiles : function () {
506
if (this._swfReference) {
507
this._swfReference.callSWF("setAllowMultipleFiles", [this.get("multipleFiles")]);
512
* Syncs the state of the `enabled` attribute between this class
513
* and the Flash uploader.
515
* @method _triggerEnabled
518
_triggerEnabled : function () {
519
if (this.get("enabled")) {
520
this._swfReference.callSWF("enable");
521
this._swfReference._swf.setAttribute("aria-disabled", "false");
522
this._setButtonClass("disabled", false);
525
this._swfReference.callSWF("disable");
526
this._swfReference._swf.setAttribute("aria-disabled", "true");
527
this._setButtonClass("disabled", true);
532
* Getter for the `fileList` attribute
534
* @method _getFileList
537
_getFileList : function () {
538
return this._fileList.concat();
542
* Setter for the `fileList` attribute
544
* @method _setFileList
547
_setFileList : function (val) {
548
this._fileList = val.concat();
549
return this._fileList.concat();
553
* Adjusts the content of the `fileList` based on the results of file selection
554
* and the `appendNewFiles` attribute. If the `appendNewFiles` attribute is true,
555
* then selected files are appended to the existing list; otherwise, the list is
556
* cleared and populated with the newly selected files.
558
* @method _updateFileList
559
* @param ev {Event} The file selection event received from the uploader.
562
_updateFileList : function (ev) {
564
Y.one("body").focus();
565
this._swfReference._swf.focus();
568
var newfiles = ev.fileList,
569
fileConfObjects = [],
571
swfRef = this._swfReference,
572
filterFunc = this.get("fileFilterFunction"),
575
Y.each(newfiles, function (value) {
576
var newFileConf = {};
577
newFileConf.id = value.fileId;
578
newFileConf.name = value.fileReference.name;
579
newFileConf.size = value.fileReference.size;
580
newFileConf.type = value.fileReference.type;
581
newFileConf.dateCreated = value.fileReference.creationDate;
582
newFileConf.dateModified = value.fileReference.modificationDate;
583
newFileConf.uploader = swfRef;
585
fileConfObjects.push(newFileConf);
589
Y.each(fileConfObjects, function (value) {
590
var newfile = new Y.FileFlash(value);
591
if (filterFunc(newfile)) {
592
parsedFiles.push(newfile);
597
Y.each(fileConfObjects, function (value) {
598
parsedFiles.push(new Y.FileFlash(value));
602
if (parsedFiles.length > 0) {
603
oldfiles = this.get("fileList");
606
this.get("appendNewFiles") ? oldfiles.concat(parsedFiles) : parsedFiles );
608
this.fire("fileselect", { fileList: parsedFiles });
616
* Handles and retransmits events fired by `Y.FileFlash` and `Y.Uploader.Queue`.
618
* @method _uploadEventHandler
619
* @param event The event dispatched during the upload process.
622
_uploadEventHandler : function (event) {
624
switch (event.type) {
625
case "file:uploadstart":
626
this.fire("fileuploadstart", event);
628
case "file:uploadprogress":
629
this.fire("uploadprogress", event);
631
case "uploaderqueue:totaluploadprogress":
632
this.fire("totaluploadprogress", event);
634
case "file:uploadcomplete":
635
this.fire("uploadcomplete", event);
637
case "uploaderqueue:alluploadscomplete":
639
this.fire("alluploadscomplete", event);
641
case "file:uploaderror": //overflow intentional
642
case "uploaderqueue:uploaderror":
643
this.fire("uploaderror", event);
645
case "file:uploadcancel": // overflow intentional
646
case "uploaderqueue:uploadcancel":
647
this.fire("uploadcancel", event);
656
* Starts the upload of a specific file.
659
* @param file {Y.FileFlash} Reference to the instance of the file to be uploaded.
660
* @param url {String} The URL to upload the file to.
661
* @param [postVars] {Object} A set of key-value pairs to send as variables along with the file upload HTTP request.
662
* If not specified, the values from the attribute `postVarsPerFile` are used instead.
664
upload : function (file, url, postvars) {
666
var uploadURL = url || this.get("uploadURL"),
667
postVars = postvars || this.get("postVarsPerFile"),
668
fileId = file.get("id");
670
postVars = postVars.hasOwnProperty(fileId) ? postVars[fileId] : postVars;
672
if (file instanceof Y.FileFlash) {
674
file.on("uploadstart", this._uploadEventHandler, this);
675
file.on("uploadprogress", this._uploadEventHandler, this);
676
file.on("uploadcomplete", this._uploadEventHandler, this);
677
file.on("uploaderror", this._uploadEventHandler, this);
678
file.on("uploadcancel", this._uploadEventHandler, this);
680
file.startUpload(uploadURL, postVars, this.get("fileFieldName"));
685
* Starts the upload of all files on the file list, using an automated queue.
688
* @param url {String} The URL to upload the files to.
689
* @param [postVars] {Object} A set of key-value pairs to send as variables along with the file upload HTTP request.
690
* If not specified, the values from the attribute `postVarsPerFile` are used instead.
692
uploadAll : function (url, postvars) {
693
this.uploadThese(this.get("fileList"), url, postvars);
697
* Starts the upload of the files specified in the first argument, using an automated queue.
699
* @method uploadThese
700
* @param files {Array} The list of files to upload.
701
* @param url {String} The URL to upload the files to.
702
* @param [postVars] {Object} A set of key-value pairs to send as variables along with the file upload HTTP request.
703
* If not specified, the values from the attribute `postVarsPerFile` are used instead.
705
uploadThese : function (files, url, postvars) {
707
var uploadURL = url || this.get("uploadURL"),
708
postVars = postvars || this.get("postVarsPerFile");
710
this.queue = new UploaderQueue({
711
simUploads: this.get("simLimit"),
712
errorAction: this.get("errorAction"),
713
fileFieldName: this.get("fileFieldName"),
715
uploadURL: uploadURL,
716
perFileParameters: postVars,
717
retryCount: this.get("retryCount")
720
this.queue.on("uploadstart", this._uploadEventHandler, this);
721
this.queue.on("uploadprogress", this._uploadEventHandler, this);
722
this.queue.on("totaluploadprogress", this._uploadEventHandler, this);
723
this.queue.on("uploadcomplete", this._uploadEventHandler, this);
724
this.queue.on("alluploadscomplete", this._uploadEventHandler, this);
725
this.queue.on("alluploadscancelled", function () {this.queue = null;}, this);
726
this.queue.on("uploaderror", this._uploadEventHandler, this);
727
this.queue.startUpload();
729
this.fire("uploadstart");
736
* The template for the Flash player container. Since the Flash player container needs
737
* to completely overlay the &lquot;Select Files&rqot; control, it's positioned absolutely,
738
* with width and height set to 100% of the parent.
740
* @property FLASH_CONTAINER
743
* @default '<div id="{swfContainerId}" style="position:absolute; top:0px; left: 0px; margin: 0; padding: 0;
744
* border: 0; width:100%; height:100%"></div>'
746
FLASH_CONTAINER: '<div id="{swfContainerId}" style="position:absolute; top:0px; left: 0px; margin: 0; ' +
747
'padding: 0; border: 0; width:100%; height:100%"></div>',
750
* The template for the "Select Files" button.
752
* @property SELECT_FILES_BUTTON
755
* @default "<button type='button' class='yui3-button' tabindex='-1'>{selectButtonLabel}</button>"
757
SELECT_FILES_BUTTON: "<button type='button' class='yui3-button' tabindex='-1'>{selectButtonLabel}</button>",
760
* The static property reflecting the type of uploader that `Y.Uploader`
761
* aliases. The UploaderFlash value is `"flash"`.
770
* The identity of the widget.
774
* @default 'uploader'
782
* Static property used to define the default attribute configuration of
793
* A Boolean indicating whether newly selected files should be appended
794
* to the existing file list, or whether they should replace it.
796
* @attribute appendNewFiles
805
* The names of CSS classes that correspond to different button states
806
* of the "Select Files" control. These classes are assigned to the
807
* "Select Files" control based on the mouse states reported by the
808
* Flash player. The keys for the class names are:
810
* <li> <strong>`hover`</strong>: the class corresponding to mouse hovering over
811
* the "Select Files" button.</li>
812
* <li> <strong>`active`</strong>: the class corresponding to mouse down state of
813
* the "Select Files" button.</li>
814
* <li> <strong>`disabled`</strong>: the class corresponding to the disabled state
815
* of the "Select Files" button.</li>
816
* <li> <strong>`focus`</strong>: the class corresponding to the focused state of
817
* the "Select Files" button.</li>
819
* @attribute buttonClassNames
821
* @default { hover: "yui3-button-hover",
822
* active: "yui3-button-active",
823
* disabled: "yui3-button-disabled",
824
* focus: "yui3-button-selected"
829
"hover": "yui3-button-hover",
830
"active": "yui3-button-active",
831
"disabled": "yui3-button-disabled",
832
"focus": "yui3-button-selected"
837
* A Boolean indicating whether the uploader is enabled or disabled for user input.
848
* The action performed when an upload error occurs for a specific file being uploaded.
849
* The possible values are:
851
* <li> <strong>`UploaderQueue.CONTINUE`</strong>: the error is ignored and the upload process is continued.</li>
852
* <li> <strong>`UploaderQueue.STOP`</strong>: the upload process is stopped as soon as any other parallel file
853
* uploads are finished.</li>
854
* <li> <strong>`UploaderQueue.RESTART_ASAP`</strong>: the file is added back to the front of the queue.</li>
855
* <li> <strong>`UploaderQueue.RESTART_AFTER`</strong>: the file is added to the back of the queue.</li>
857
* @attribute errorAction
859
* @default UploaderQueue.CONTINUE
863
validator: function (val) {
865
val === UploaderQueue.CONTINUE ||
866
val === UploaderQueue.STOP ||
867
val === UploaderQueue.RESTART_ASAP ||
868
val === UploaderQueue.RESTART_AFTER
874
* An array indicating what fileFilters should be applied to the file
875
* selection dialog. Each element in the array should be an object with
876
* the following key-value pairs:
878
* description : String
879
extensions: String of the form &lquot;*.ext1;*.ext2;*.ext3;...&rquot;
881
* @attribute fileFilters
890
* A filtering function that is applied to every file selected by the user.
891
* The function receives the `Y.File` object and must return a Boolean value.
892
* If a `false` value is returned, the file in question is not added to the
893
* list of files to be uploaded.
894
* Use this function to put limits on file sizes or check the file names for
895
* correct extension, but make sure that a server-side check is also performed,
896
* since any client-side restrictions are only advisory and can be circumvented.
898
* @attribute fileFilterFunction
902
fileFilterFunction: {
907
* A String specifying what should be the POST field name for the file
908
* content in the upload request.
910
* @attribute fileFieldName
919
* The array of files to be uploaded. All elements in the array
920
* must be instances of `Y.FileFlash` and be instantiated with a `fileId`
921
* retrieved from an instance of the uploader.
923
* @attribute fileList
929
getter: "_getFileList",
930
setter: "_setFileList"
934
* A Boolean indicating whether multiple file selection is enabled.
936
* @attribute multipleFiles
945
* An object, keyed by `fileId`, containing sets of key-value pairs
946
* that should be passed as POST variables along with each corresponding
947
* file. This attribute is only used if no POST variables are specifed
948
* in the upload method call.
950
* @attribute postVarsPerFile
959
* The label for the "Select Files" widget. This is the value that replaces the
960
* `{selectButtonLabel}` token in the `SELECT_FILES_BUTTON` template.
962
* @attribute selectButtonLabel
964
* @default "Select Files"
967
value: "Select Files"
971
* The widget that serves as the "Select Files" control for the file uploader
974
* @attribute selectFilesButton
975
* @type {Node | Widget}
976
* @default A standard HTML button with YUI CSS Button skin.
978
selectFilesButton : {
979
valueFn: function () {
980
return Y.Node.create(substitute(Y.UploaderFlash.SELECT_FILES_BUTTON, {selectButtonLabel: this.get("selectButtonLabel")}));
985
* The number of files that can be uploaded
986
* simultaneously if the automatic queue management
987
* is used. This value can be in the range between 2
990
* @attribute simLimit
996
validator: function (val) {
997
return (val >= 2 && val <= 5);
1002
* The URL to the SWF file of the flash uploader. A copy local to
1003
* the server that hosts the page on which the uploader appears is
1008
* @default "CDN Prefix + uploader/assets/flashuploader.swf" with a
1009
* random GET parameter for IE (to prevent buggy behavior when the SWF
1013
valueFn: function () {
1014
var prefix = Y.Env.cdn + "uploader/assets/flashuploader.swf";
1017
return (prefix + "?t=" + Y.guid("uploader"));
1025
* The id's or `Node` references of the DOM elements that precede
1026
* and follow the `Select Files` button in the tab order. Specifying
1027
* these allows keyboard navigation to and from the Flash player
1028
* layer of the uploader.
1029
* The two keys corresponding to the DOM elements are:
1031
* <li> `from`: the id or the `Node` reference corresponding to the
1032
* DOM element that precedes the `Select Files` button in the tab order.</li>
1033
* <li> `to`: the id or the `Node` reference corresponding to the
1034
* DOM element that follows the `Select Files` button in the tab order.</li>
1036
* @attribute tabElements
1045
* The URL to which file upload requested are POSTed. Only used if a different url is not passed to the upload method call.
1047
* @attribute uploadURL
1056
* The number of times to try re-uploading a file that failed to upload before
1057
* cancelling its upload.
1059
* @attribute retryCount
1069
Y.UploaderFlash.Queue = UploaderQueue;
1072
}, '3.10.3', {"requires": ["swf", "widget", "base", "cssbutton", "node", "event-custom", "file-flash", "uploader-queue"]});