Hi,
SuccessHandler is called because of the 200 OK from API. but even if the API is returning 200 OK, still i wanted to change the state manually based on condition.
Once the file is uploaded, Is there a way to change value of state:State variable of interface FileInfo inside onSuccess handler?
Something like below code, just wants to change the state so it doesn't show file is successfully uploaded message in green in upload control, So doing this is not changing the state, state remains as 3 (success) for all the files -
public onSuccess(e: SuccessEvent) {
if
(e.response.body.isSuccess) {
// do success stuff
}
else
{
// change all files state to 0 (error in red)
e.files.forEach(file => {
file.state = 0;
});
}
}
Arun,
Would you be able to share the answer you received on this?
Thanks