Arcturus
Arcturus

Reputation: 437

Kendo Async Upload : File displays even after clicking Remove

I am uploading files through Kendo Upload. On uploading a file and then clicking on remove, the RemoveCircular method of controller is called and it duly deletes the file from server.

However the Filename and Remove button are still displayed though they should be removed as well.

Is there anything I'm missing here? Thanks for help.

The code in .cshtml is as below.

<div class="controls-trck">
  @(Html.Kendo().Upload()
  Name("UploadCircular")  
 .HtmlAttributes(new { style = "width:220px" })                     
 .Multiple(false)
 .Async(a => a
    .Save("SaveCircular", "DB0010062")
    .Remove("RemoveCircular", "DB0010062")
    .AutoUpload(false)
     )                                                                                  
  ) 
</div>

Code in Controller:

public ActionResult RemoveCircular(string[] fileNames)
{
  foreach (var fullName in fileNames)
  {
     //Delete Files
  }
  return Content("");
}

Upvotes: 1

Views: 884

Answers (1)

Petur Subev
Petur Subev

Reputation: 20193

It looks like empty response is treated like as an unsuccessful response. Try to return empty JSON instead.

Upvotes: 1

Related Questions