API Docs for: 3.13.0
Show:

File: file/js/file.js

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