Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Froala编辑AWS S3 CORS问题_Javascript_Angular_Amazon Web Services_Amazon S3_Froala - Fatal编程技术网

Javascript Froala编辑AWS S3 CORS问题

Javascript Froala编辑AWS S3 CORS问题,javascript,angular,amazon-web-services,amazon-s3,froala,Javascript,Angular,Amazon Web Services,Amazon S3,Froala,我已经在Angular 4应用程序中实现了Frola编辑器。我试图上传AWS S3上的图像,但我得到了CORS错误。 这是我的档案 服务器端(用于生成签名): 这是我的角度组件文件: //initialize froala after getting the signature public initialize(initControls) { this.froala = initControls; this._RestService.getEditorSignature().s

我已经在Angular 4应用程序中实现了Frola编辑器。我试图上传AWS S3上的图像,但我得到了CORS错误。 这是我的档案

服务器端(用于生成签名):

这是我的角度组件文件:

  //initialize froala after getting the signature
  public initialize(initControls) {
  this.froala = initControls;
  this._RestService.getEditorSignature().subscribe(
  d => {
    this.editorOptions['imageUploadToS3'] = d;
    this.froala.initialize();
  });
 }
以下是我的Cors配置:

<CORSConfiguration>
          <CORSRule>
              <AllowedOrigin>http://localhost:4200</AllowedOrigin>
              <AllowedMethod>GET</AllowedMethod>
              <AllowedMethod>POST</AllowedMethod>
              <AllowedMethod>PUT</AllowedMethod>
              <MaxAgeSeconds>3000</MaxAgeSeconds>
              <AllowedHeader>Authoriz</AllowedHeader>
          </CORSRule>
 </CORSConfiguration>

我也尝试在和中使用“*”,但仍然不起作用。
有人能给我指出正确的方向吗?

事实上,一切都很顺利。我把区域从s3改为ap-south-1。 我误判了水桶区域

<CORSConfiguration>
          <CORSRule>
              <AllowedOrigin>http://localhost:4200</AllowedOrigin>
              <AllowedMethod>GET</AllowedMethod>
              <AllowedMethod>POST</AllowedMethod>
              <AllowedMethod>PUT</AllowedMethod>
              <MaxAgeSeconds>3000</MaxAgeSeconds>
              <AllowedHeader>Authoriz</AllowedHeader>
          </CORSRule>
 </CORSConfiguration>