前端之家收集整理的这篇文章主要介绍了
angular 文件上传,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
文件上传时的处理
@H_
301_2@$scope.submit=function(){
varurl=$scope._datalistmodel.impexp.imp;
vart_file=newFormData(document.getElementById('upload_file'));//id是form表单的id
$http({
headers:{
'content-type':undefined
},url:url,data:t_file,method:'post',transformRequest:angular.identity
}).then(function(d){
});
};