1.文件上传时的处理

$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){});};

2.文件下载

根据链接下载文件时,http请求不能打开下载窗口,用a标签

<ahref='{{file.$href("_download")}}'><iclass='glyphiconglyphicon-saveattach-operate'></i></a>