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