Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- downloadinit: function( event, detail, sender ){
- this.files = sender.files;
- for ( var i = 0; i < this.files.length; i++ ) {
- var file = this.files[i]
- this.uploadsize += file.size;
- this.fileList[this.uploadPop] = file.name;
- this.uploadPop += 1;
- }
- event.stopPropagation(); // Stop stuff happening
- event.preventDefault(); // Totally stop stuff happening
- for( var i = 0, f; f = this.files[i]; ++i) {
- this.data.append( sender.name, f, f.name );
- }
- this.queryUrl2 = "projects/submit.php?pjid="+this.projDetails.projectid;
- this.submitBody = this.data;
- this.$.ajaxAction2.contentType = null;
- },
- triggerDownload: function(){
- this.$.ajaxAction2.go();
- data = new FormData;
- this.files = null;
- this.fileList = [];
- this.submitBody = null;
- this.uploadsize = 0;
- this.uploadPop = 0;
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement