Bug:
I have 2 ngFileDrop and ngFileSelect in the same html page, when I drop or browser a file for a specified component they will call all handlers from all components.
handleUploadResourceCosts(data): void {
console.log("handleUploadResourceCosts: data do upload.. ");
this.hasBaseDropZoneOverResourceCosts = false;
if (data && data.status === 200) {
this.snackBar.open("Resources file uploaded with success.", "Close");
}else if(data && data.status === 400){
this.snackBar.open("You tried upload a invalid resources file.", "Close");
}
}
handleUploadInvoiced(data): void {
console.log("handleUploadInvoiced: data do upload2.. ");
if (data && data.status === 200) {
this.snackBar.open("Invoiced file uploaded with success.", "Close");
}else if(data && data.status === 400){
this.snackBar.open("You tried upload a invalid invoiced file.", "Close");
}
this.hasBaseDropZoneOverInvoiced = false;
}
With version 1.6 if i upload Invoice file they will call handleUploadInvoiced handler, it's ok.
With version 2.0 if i upload Invoice file they will call both handlers and options. So if i submit one file in the first component they will execute the last http option and make the wrong request.
Bug: I have 2 ngFileDrop and ngFileSelect in the same html page, when I drop or browser a file for a specified component they will call all handlers from all components.
Version: 2.0.0
This bug don't exist at version 1.6
example code that works in version 1.6
html:
component.ts:
With version 1.6 if i upload Invoice file they will call handleUploadInvoiced handler, it's ok.
With version 2.0 if i upload Invoice file they will call both handlers and options. So if i submit one file in the first component they will execute the last http option and make the wrong request.