Closed DamithaPerera closed 6 years ago
Hi @DamithaPerera.
you'd have to check if there is already a toast like that existing or usually you can set up not to show duplicate toasts with the toast libraries. Closing this as this is not really a ng2-file-input library code related issue...
public onAction(event: any) { this.resImagesSize = event.currentFiles; for (let i = 0; i < this.resImagesSize[i].size; i++) { if (this.resImagesSize[i].size > 2000000) { this.toasterService.pop('error', 'Error', 'Please upload less than 2MB image'); this.resImagesSize.splice(i, 1); } else { this.resImages = this.resImagesSize; } } }
Is there any way to validate ?, because I tried to validate like this... but the problem is when i upload more than 2 images it display 2 popup messages..... any solution ??