We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Uploader async view response send by api

I want to be able to read the response for successful uploaded file.

Currently I use

(success)="onUploadSuccess($event)"

and I get this args event object ( where I read args.response property) :

args.response =

{"readyState": 4,

"statusCode": 200,

"statusText": "",

"headers": "content-length: 84\rcontent-type: application/json\r",

"withCredentials": false

}

It is a success message with status: 200, but inside of response  the server sends something like:

{"Status":"ValidationFailed","Errors":[{"Message":"Portfolio Name must be unique"}]}.

I see this in dev tool network traffic and I need to read it and act accordingly.

How I can do this pls


3 Replies

IL Indhumathy Loganathan Syncfusion Team November 7, 2022 10:28 AM

Hi Liviu,


Greetings from Syncfusion support.


From the explanation, we were not sure whether you were using the EJ1 or EJ2 Uploader component at your end. Here, we have included our UG documentation for your reference.


EJ1: https://help.syncfusion.com/angular/uploadbox/getting-started


EJ2: https://ej2.syncfusion.com/angular/documentation/uploader/getting-started/


Please confirm the component. We will assist you based on your confirmation.


Regards,

Indhumathy L



LC Liviu Cornea November 7, 2022 11:23 AM

Hi

I am using EJ2 uploader (Angular 14 version of project).

Here is the link that I am using for my references:

https://ej2.syncfusion.com/angular/documentation/uploader/async/



UD UdhayaKumar Duraisamy Syncfusion Team November 9, 2022 07:53 AM

Hi Liviu,


We have validated the reported query on our end. Unfortunately, we couldn’t reproduce the reported issue as per your scenario. We also shared a sample and video illustration for reference. Also, we request you to provide additional details about the query as mentioned below, This will help us validate the query further and provide you with a better solution.

1. Exact Requirement details.

2. Issue reproducing runnable sample (or modify the shared sample as per your scenario).

3. Issue replication steps.

4. Video illustration of the issue.

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


[Reference]


Regards,

Udhaya Kumar D


Loader.
Live Chat Icon For mobile
Up arrow icon