Attempt to fix multiple queue events for file upload
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
				
			This commit is contained in:
		@@ -54,8 +54,11 @@ export class ResumableFileUploadService implements OnDestroy{
 | 
				
			|||||||
  handleState(state:UploadState) {
 | 
					  handleState(state:UploadState) {
 | 
				
			||||||
      switch(state.status) {
 | 
					      switch(state.status) {
 | 
				
			||||||
        case "queue": {
 | 
					        case "queue": {
 | 
				
			||||||
 | 
					            var file =this.files.find((f) => f.identifier == state.uploadId )
 | 
				
			||||||
 | 
					            if(!file) {
 | 
				
			||||||
              this.files.push(new File(state));
 | 
					              this.files.push(new File(state));
 | 
				
			||||||
              this.isClosed=false;  
 | 
					              this.isClosed=false;  
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        };break;
 | 
					        };break;
 | 
				
			||||||
        case "uploading": {
 | 
					        case "uploading": {
 | 
				
			||||||
          this.isUploading = true;
 | 
					          this.isUploading = true;
 | 
				
			||||||
@@ -77,7 +80,7 @@ export class ResumableFileUploadService implements OnDestroy{
 | 
				
			|||||||
          var file =this.files.find((f) => f.identifier == state.uploadId )
 | 
					          var file =this.files.find((f) => f.identifier == state.uploadId )
 | 
				
			||||||
          if(file) {
 | 
					          if(file) {
 | 
				
			||||||
            file.error=true;
 | 
					            file.error=true;
 | 
				
			||||||
            file.errorMessage = state.response;
 | 
					            file.errorMessage = state.response as string;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        };break;
 | 
					        };break;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user