File uploader failure event

Hi,

File uploader failure event args, the property event sometimes coming as 'e' or sometimes as 'event'

Which one should we follow?


https://ej2.syncfusion.com/angular/documentation/api/uploader/#failure


3 Replies

SP Sureshkumar P Syncfusion Team May 27, 2022 10:03 AM UTC

Hi Dayakar,

We have created the sample based on your shared information. But we cannot replicate the reported issue on our end. please check the attached sample here:

Sample link: https://stackblitz.com/edit/angular-wztkrg?file=app.component.html,app.component.ts

If still you have faced the same issue, then please replicate the reported issue in the above sample and revert us with detailed issue replication procedure. These details will help us to provide an exact solution as earlier as possible.

Regards,

Sureshkumar P



DR Dayakar Reddy May 30, 2022 08:42 AM UTC

Hi,


we are using version    "@syncfusion/ej2-angular-inputs": "19.4.42".


But if we use args as any instead of FailureEventArgs it is showing 'e' in the console log.

How can i cancel failure event if we use FailureEventArgs ? and how can i get current target if we use FailureEventArgs ?

please find the attached screenshots


Attachment: Desktop_a97c8abf.rar



SP Sureshkumar P Syncfusion Team May 31, 2022 08:02 AM UTC

HI Dayakar,


We cannot have cancel option in our FailureEventArgs. Because this will trigger after uploaded files are failed state only so we cannot do any call back function by using this event. And we can get the current target as “(args.e as any).currentTarget”.


Find the modified sample here: https://stackblitz.com/edit/angular-wztkrg-wdmjw8?file=app.component.ts


Regards,

Sureshkumar P


Loader.
Up arrow icon