upload.js 388 B

123456789101112131415161718
  1. /*
  2. * Copyright (c) 2014
  3. *
  4. * This file is licensed under the Affero General Public License version 3
  5. * or later.
  6. *
  7. * See the COPYING-README file.
  8. *
  9. */
  10. function Upload(fileSelector) {
  11. if ($.support.xhrFileUpload) {
  12. return new XHRUpload(fileSelector.target.files);
  13. } else {
  14. return new FormUpload(fileSelector);
  15. }
  16. }
  17. Upload.target = OC.filePath('files', 'ajax', 'upload.php');