Hello!
We have problem with "Upload" component.
It's looks like event "OnSuccess" on it (on Upload component) does not work.
We use asynchronous upload, and Upload component is routed to web api controller method in which we process upload.
When everything went ok with upload we set response status code [OK] (200) and we also trying to sent some data as Content back to client.
Our server-side code (in method in ASP.NET Web API controller in which we process upload from Upload component) looks like:
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StringContent("File was succesfuly uploaded");
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/plain");
return response;
When we try do things this way, then Upload component on client-side activates OnError event instead of OnSuccess event.
Why is that? And is there some workaround for this?
thanks,
Igor.
We have problem with "Upload" component.
It's looks like event "OnSuccess" on it (on Upload component) does not work.
We use asynchronous upload, and Upload component is routed to web api controller method in which we process upload.
When everything went ok with upload we set response status code [OK] (200) and we also trying to sent some data as Content back to client.
Our server-side code (in method in ASP.NET Web API controller in which we process upload from Upload component) looks like:
HttpResponseMessage response = new HttpResponseMessage(HttpStatusCode.OK);
response.Content = new StringContent("File was succesfuly uploaded");
response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/plain");
return response;
When we try do things this way, then Upload component on client-side activates OnError event instead of OnSuccess event.
Why is that? And is there some workaround for this?
thanks,
Igor.