@(Html.Telerik().Upload()
.Name("attachments")
.Multiple(true)
.Async(async => async
.Save("SaveAttachment", "ControllerNameHere")
.Remove("RemoveAttachment", "ControllerNameHere")
.AutoUpload(true)
)
.ClientEvents(events => {
events.OnRemove("onRemove");
events.OnUpload("onUpload");
})
)
The javascript looks like this:
function onRemove(e) {
e.data = { test: 1, imageIdentifier: $("#ImageIdentifier").val() };
return true;
}
The controller method looks like this:
public ActionResult RemoveAttachment(string[] fileNames, int? test, Guid? imageIdentifier) {
//test is null (hard-coded in the javascript just to prove it wasn't really null)
//imageIdentifier is null
}