在ajax formdata中获取415(不受支持的媒体类型)回复春季

想通过ajax将图像数据发送到控制器。但是出现错误415。我正在使用angular js并将图像发送到控制器。但是错误发生了。请帮助
        fd= new FormData();                 
        fd.append("image",imageall);                            
        call(fd);
    });
}

function call(fd){
    $http({        
         method: 'POST',contentType: "application/json; charset=utf-8",url: "./WQF00069/update.app",data: fd,processData: false,enctype:'multipart/form-data',transformRequest: angular.identity,cache: false,timeout: 600000,headers: { 'Content-Type': undefined},}).success(function(data) {
         flash.create('info',' Update Success Fully ','large-text');
         `enter code here`
     }).error(function(response){ 
         console.dir(response);
        flash.create('danger','There is a  Problem.Contact With Administrator','large-text');       
     });
}
sweetmessi19 回答:在ajax formdata中获取415(不受支持的媒体类型)回复春季

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3159859.html

大家都在问