Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. downloadinit: function( event, detail, sender ){
  2. this.files = sender.files;
  3. for ( var i = 0; i < this.files.length; i++ ) {
  4. var file = this.files[i]
  5. this.uploadsize += file.size;
  6. this.fileList[this.uploadPop] = file.name;
  7. this.uploadPop += 1;
  8. }
  9.  
  10. event.stopPropagation(); // Stop stuff happening
  11. event.preventDefault(); // Totally stop stuff happening
  12.  
  13. for( var i = 0, f; f = this.files[i]; ++i) {
  14. this.data.append( sender.name, f, f.name );
  15. }
  16. this.queryUrl2 = "projects/submit.php?pjid="+this.projDetails.projectid;
  17. this.submitBody = this.data;
  18. this.$.ajaxAction2.contentType = null;
  19. },
  20. triggerDownload: function(){
  21. this.$.ajaxAction2.go();
  22. data = new FormData;
  23. this.files = null;
  24. this.fileList = [];
  25. this.submitBody = null;
  26. this.uploadsize = 0;
  27. this.uploadPop = 0;
  28. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement