角IE9文件上传不工作 [英] Angular IE9 fileupload is not working
本文介绍了角IE9文件上传不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用这种方式来上传文件:
I use this way to upload file:
<input type="file"
name="upload-file"
ng-model= "excelFile"
accept=".xlsx"
onchange="angular.element(this).scope().fileChanged(this);"
required="true"
/>
在控制器创建fileChanged方法
Create the fileChanged method in the controller
$scope.fileChanged = function(files) {
$scope.excelFile = files[0];
};
它工作在火狐,Chrome IE10,IE11,但在IE9它表明文件是空我们不确定。
It works in FireFox, Chrome IE10, IE11, but in IE9 it shows that the "files is null our undefined".
推荐答案
我上传的图像文件时所面临的同样的问题。它在IE10及更高版本正常工作。
低于10的任何版本,文件上传不工作。请参阅此链接
I faced the same issue when uploading image files. It worked fine in IE10 and later versions. Any version below 10 , file upload is not working. Refer this link
IE9Issue:文件上传使用angularjs
IE9Issue : File Upload using angularjs
这篇关于角IE9文件上传不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文