angular 文件上传
发布时间:2020-12-17 08:12:25 所属栏目:安全 来源:网络整理
导读:文件上传时的处理 $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',t
文件上传时的处理 $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){ }); }; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |