【发布时间】:2016-06-02 12:17:47
【问题描述】:
$scope.uploadFiles = function () {
//debugger;
var request = {
method: 'POST',
url: 'http://localhost/upload/',
data: formdata,
headers: {
'Content-Type': undefined
}
};
// SEND THE FILES.
$http(request)
.success(function (d) {
alert(d);
})
.error(function () {
});
}
我正在进入控制台窗口,例如 XMLHttpRequest 无法加载 http://localhost/upload/。请求的资源上不存在“Access-Control-Allow-Origin”标头。因此,Origin 'http://localhost:55555' 不允许访问。响应的 HTTP 状态代码为 405。
【问题讨论】:
标签: angularjs file-upload http-post image-uploading