我已经在 Extjs Classic 中完成了多个文件上传现在我想在现代工具包中实现它但是有问题没有 fileButton 字段所以我正在使用文件字段,但我不确定如何从文件字段中获取文件数据这是代码:
{
xtype: 'fieldset',
title: 'Attechments',
reference: 'attachmentfile',
padding: 10,
layout: {
type: 'vbox',
align: 'stretch'
},
defaults: {
labelWidth: 130
},
items: [
{
xtype: 'filefield',
text: 'Attach Files',
name: 'files',
listeners:{
change: 'onFileChange'
}
}
]
}
在视图控制器中:
onFileChange: function (field, e, value) {
// how to get fileField data so that i can upload via ajax and attach //more files options
}