文件上传,无法提交,总是报错
Uncaught NotFoundError: Failed to execute ‘appendChild’ on ‘Node’: The new child element is null. 。
Ext的submit()执行错误,跟踪js代码发现有一个参数为null了,最后发现是文件录入框的类型填错了,ext无法正常解析。
错误代码:
items : [ {
xtype : 'textfield',
inputType : 'file',
///id : ...
} ]
xtype的类型填成这样不能提交上传的文件,
正确写法:
items : [ {
xtype : 'filefield',
///id : ...
} ]
这样ext就能正常提交表单了。