1 |
efrain |
1 |
YUI.add('file', function (Y, NAME) {
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* The File class provides a wrapper for a file pointer, either through an HTML5
|
|
|
5 |
* implementation or as a reference to a file pointer stored in Flash. The File wrapper
|
|
|
6 |
* also implements the mechanics for uploading a file and tracking its progress.
|
|
|
7 |
* @module file
|
|
|
8 |
* @main file
|
|
|
9 |
* @since 3.5.0
|
|
|
10 |
*/
|
|
|
11 |
|
|
|
12 |
/**
|
|
|
13 |
* `Y.File` serves as an alias for either <a href="FileFlash.html">`Y.FileFlash`</a>
|
|
|
14 |
* or <a href="FileHTML5.html">`Y.FileHTML5`</a>, depending on the feature set available
|
|
|
15 |
* in a specific browser.
|
|
|
16 |
*
|
|
|
17 |
* @class File
|
|
|
18 |
*/
|
|
|
19 |
|
|
|
20 |
var Win = Y.config.win;
|
|
|
21 |
|
|
|
22 |
if (Win && Win.File && Win.FormData && Win.XMLHttpRequest) {
|
|
|
23 |
Y.File = Y.FileHTML5;
|
|
|
24 |
}
|
|
|
25 |
|
|
|
26 |
else {
|
|
|
27 |
Y.File = Y.FileFlash;
|
|
|
28 |
}
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
}, '3.18.1', {"requires": ["file-flash", "file-html5"]});
|