IE11中拒绝AWS S3访问

时间:2018-07-13 12:41:42

标签: amazon-web-services cors internet-explorer-11

我是AWS的新手-我正在使用ng-file-upload-shim.min.js上载图像,但IE11中出现错误-访问被拒绝。

在CORS中-我的配置

<CORSRule>
          <AllowedOrigin>*</AllowedOrigin>
          <AllowedMethod>GET</AllowedMethod>
          <AllowedMethod>POST</AllowedMethod>
          <AllowedMethod>DELETE</AllowedMethod>
          <MaxAgeSeconds>3000</MaxAgeSeconds>
          <AllowedHeader>*</AllowedHeader>
    </CORSRule>

和js

 for (var i = 0; i < files.length; i++) {
                          var fileKey = fileNameTypeJsonArr[i].filename;

                          // Add the promises to the promise list.
                          promises.push(Upload.upload({
                              url: $scope.endpointUrl + $scope.bucketName,
                              method: 'POST',
                              fields: {
                                key: fileKey,
                                AWSAccessKeyId: $scope.key,
                                policy: result[i].policy,
                                signature: result[i].signature,
                                acl: $scope.acl,
                                "Content-Type": fileNameTypeJsonArr[i].type,
                                "x-amz-server-side-encryption": "xxxx",
                                filename: fileKey
                              },
                              file: files[i]
                          }).progress(function (evt) {

在所有浏览器中都可以正常工作,但在IE11中出现错误

0 个答案:

没有答案