AWS JS SDK 2.596.0 MediaStoreData putObject导致NetworkingError:网络故障

时间:2020-01-03 12:14:15

标签: amazon-web-services aws-elemental

新年快乐!我正尝试通过浏览器将文件发送到AWS Elemental MediaStore ,只是在没有其他信息的情况下被拒绝。我有一个容器,并尽可能地打开了CORS政策。该代码直接来自亚马逊:

代码:

var mediastoredata = new AWS.MediaStoreData();

var params = {
    Body: '/image.png',
    Path: '/image.png',
    CacheControl: 'no-cache',
    ContentType: 'image/png',
    StorageClass: 'TEMPORAL',
    UploadAvailability: 'STREAMING'
};

mediastoredata.putObject(params, function(err, data) {
    if (err) console.log(err, err.stack);
    else     console.log('SUCCESS',data);
});

CORS

[
  {
    "AllowedHeaders": [
      "*"
    ],
    "AllowedMethods": [
      "GET",
      "PUT",
      "HEAD"
    ],
    "AllowedOrigins": [
      "*"
    ],
    "ExposeHeaders": [
      "*"
    ],
    "MaxAgeSeconds": 3000
  }
]

AWS Logger输出:

[AWS mediastoredata undefined 0.186s 3 retries] putObject({ Body: '/image.png',
  Path: '/image.png',
  CacheControl: 'no-cache',
  ContentType: 'image/png',
  StorageClass: 'TEMPORAL',
  UploadAvailability: 'STREAMING' })

地区:eu-central-1

登录:IdentityPoolId(CognitoIdentityCredentials)

Api版本:2017-09-01

我做错什么了吗?或者通过浏览器不允许这样做吗?

0 个答案:

没有答案