Hi
I am implementing the FileManager, but I have come across a problem. When the server side upload fails, this doesn't raise the Error event, instead controls swallows the error and dumps it to the console. If there server side fails, I would like to alert the user and give more details feedback, how could I accomplish this?
In the code below I have set the error method and the action method straight up throws an exception, i also tried this just returning StatusCode(500)
<div>
@(Html.Kendo().FileManager()
.Name("filemanager")
.DataSource(ds =>
{
ds.ServerFiltering(true);
ds.Read(operation => operation
.Type(HttpVerbs.Post)
.Action("ReadDocument", "Home")
);
ds.Destroy(operation => operation
.Type(HttpVerbs.Post)
.Action("DestroyDocument", "Home")
);
ds.Create(operation => operation
.Type(HttpVerbs.Post)
.Action("CreateDocument", "Home")
);
ds.Update(operation => operation
.Type(HttpVerbs.Post)
.Action("UpdateDocument", "Home")
);
})
.UploadUrl("Upload", "Home")
.Events(e => e
.Error("onError")
)
)
</div>
<script>
function onError(e) {
console.log("there is an error");
debugger;
};
function onOpen(e) {
debugger;
};
</script>
---controller---
[HttpPost]
public IActionResult Upload(IFormFile file, string path)
{
throw new NotImplementedException("error");
}
Ross