0

I'm using Kendo UI v2014.3.1119

I could instantiate a kendo element:

$("#files").kendoUpload({
    async: {
        autoUpload: false
    }
    , multiple: false
});

However, when bind to a button event:

$('#uploadBtn').on('click', function (e) {
        e.preventDefault();

        var hey = $('#files').data('kendoUpload');

        console.log(hey.getFiles())
    });

I got the following error:

Uncaught TypeError: hey.getFiles is not a function

I followed the example from here

Not sure if this is a version issue or something I did incorrectly? Please help !

Thanks

4

1 回答 1

1

getFiles() 方法,用于检索选定的文件,只是在很久以后才实现(在Kendo UI R3 2016中)

我建议你更新你的剑道版本。如果由于某种原因不能,您可以扩展 kendoUpload 组件并为您实现。此处描述了一种扩展组件的方法。

安德烈

于 2018-01-18T11:15:05.070 回答