AngularJS 文件上传抛出 403 禁止 - IIS Windows 服务器

AngularJS File Upload throwing 403 Forbidden - IIS Windows Server

在我的应用程序中,我使用 AngularJS 文件上传来读取上传的 excel 文件。在我的控制器中,我有如下的上传方法,

Upload.upload({
         url: 'upload/url',
         file: file
   }).progress(function (evt) {
      console.log("Progress");
   }).success(function (data, status, headers, config) {
      console.log("Success");
   });
 });

但是这个 Upload.upload 失败并显示以下消息

Possibly unhandled rejection: {"data":"<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n</body>\r\n</html>\r\n<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n<!-- a padding to disable MSIE and Chrome friendly error page -->\r\n","status":403,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"upload/url","file":{},"_isDigested":true,"_chunkSize":null,"headers":{"Accept":"application/json, text/plain, */*","Authorization":"Bearer <token>"},"_deferred":{"promise":{}},"cached":false},"statusText":"","xhrStatus":"complete"}

我尝试验证对 IIS_Users 的完整访问权限,以获得源代码可用的文件夹。

帮我解决这个问题。

是防火墙阻止了文件上传。 Post删除它可以上传文件。