基于浏览器的上载,但仅使用临时凭证

时间:2013-10-09 11:43:06

标签: javascript php amazon-s3 amazon

是否有人能够仅使用基于浏览器的上传和上传到s3仅使用临时凭证?

例如:临时证书

{
accessKey: "acceskey"
secretKey: "secret"
token: "temptoken"
expiry: 1381319196000
}

这是我的政策json:

POLICY_JSON = { "expiration": "2013-12-03T12:29:27.000Z",
              "conditions": [
                {"bucket": this.get('bucket')},
                ["starts-with", "$key", this.get('folder')],
                {"acl": "public-read"},
                {"success_action_redirect": "201"},
                ["starts-with", "$Content-Type", ""],
                {"x-amz-security-token": this.get('sessionToken')}
              ]
            };

这是我提交后得到的错误。

<Error>
 <Code>AccessDenied</Code>
 <Message>Access Denied</Message>
 <RequestId>BCA2578E533D5C8E</RequestId>
 <HostId>
  kYRwZV2Y4/KQY+M2q/utO/ej2HGQ3MxlITYiwTTZwzr53Pp7Ubwmj7Sxvg6Wc6T5
 </HostId>
</Error>

0 个答案:

没有答案