Kendo UI Upload发送删除时的其他数据

时间:2015-03-18 16:48:37

标签: c# razor upload kendo-ui

当我成功使用上传组件上的删除按钮时,我正在发送附加数据。我正在使用单一文件模式。当我更改上传的文档时,首先,在没有附加数据的情况下调用remove,然后调用upload。我需要这个删除调用也发送附加数据。希望,很明显。下面是我的剃刀代码。

 <div class="form-group">
            @Html.Label("Attachments".Localize(), new { @class = "control-label col-sm-3" })
            @(Html.Kendo().Upload().Name("Attachments")
                .Async(a => a
                .Save("SaveAttachment", "Upload", new { Area = "" })
                .Remove("RemoveAttachment", "Upload", new { Area = "" })
                .AutoUpload(true)
                ).Multiple(false)
                .Messages(message =>
                {
                    message.Select("Select XSLT File");
                })
                .HtmlAttributes(new { accept = ".xslt" })
                .Events(events => events
                .Cancel("onCancel")
                .Complete("onComplete")
                .Remove(@<text>
                    function(e) {
                    e.data = { folderReference: $("#FolderReference").val() };
                    }
                </text>)
                .Select("onSelect")
                .Success("onSuccess")
                .Upload(@<text>
                    function(e) {
                    e.data = { folderReference: $("#FolderReference").val()};

                    }
                </text>)
                        )
            )
        </div>   

1 个答案:

答案 0 :(得分:1)

此问题已在2015年最新版本中得到解决。 remove事件处理程序中的其他数据集将与文件名一起发送到remove操作。