<Error>
<Code>InvalidAccessKeyId</Code>
<Message>The AWS Access Key Id you provided does not exist in our records.</Message>
<AWSAccessKeyId>ASIAJSDFW27523RELDJA</AWSAccessKeyId>
<RequestId>22F0A23F675424D0</RequestId>
<HostId>3ozDoKHMzf00wlsdfA0hsdfWDrzy21c0xqxwOwd1BJo8MqSouPZU</HostId>
</Error>
對於accessKeyID返回InvalidAccessKeyId,我現在用的是價值access_key_id通過GET到https://ingest.api.brightcove.com/v1/accounts/ {ACCOUNT_ID} /視頻/ {VIDEO_ID} /上傳的URL/{SOURCE_NAME}Brightcove的AWS S3上傳ColdFusion的
由於返回我想使用多部分上傳,我遵循以下網址提供的指導原則。使用 http://blog.tcs.de/coldfusion-amazon-s3-upload-via-form-post-example/ https://aws.amazon.com/items/1434?externalID=1434
s3.cfc從https://github.com/joedanz/cf-amazon-s3
政策:
{"expiration": {add 1 day to now}",
"conditions": [
{"bucket": bucket-name-from-brightcove},
["starts-with", "$key", "uploads/"],
{"acl": "authenticated-read"},
{"success_action_redirect": "my-server-redirect-url"},
["starts-with", "$Content-Type", "#mData.fileType#"],
["content-length-range", 0, #mData.fileSize#]
]
}
我的CF代碼:
rStruct['policy'] = ToBase64(s3policy);
s3 = createObject("component", 's3').init('access_key_id-from-brightcove','secret_access_key-from-brightcove');
rStruct['signature'] = s3.createSignature(rStruct['policy']);
rStruct['auth'] = 'authenticated-read';
rStruct['s3URL'] = 'https://bucket-name-from-brightcove.s3.amazonaws.com/';
rStruct['s3redirectURL'] = 'my-server-redirect-url';
我的格式如:(我替換隱藏字段值用jquery)
以字符開始ASIA
<form name="dlgform" id="dlgform" method="post" enctype="multipart/form-data" action="" target="submitDialog_submitFrame">
<input type="hidden" name="key" id="key" value="uploads/${filename}">
<input type="hidden" name="AWSAccessKeyId" id="AWSAccessKeyId" value="access_key_id-from-brightcove">
<input type="hidden" name="acl" id="acl" value="authenticated-read">
<input type="hidden" name="success_action_redirect" id="success_action_redirect" value="">
<input type="hidden" name="policy" id="policy" value="rStruct['policy']">
<input type="hidden" name="signature" id="signature" value="rStruct['signature']">
<input type="hidden" name="Content-Type" id="Content-Type" value="file-content-type">
File: <input type="file" name="file" />
<input type="submit" name="submit" value="Upload to Amazon S3" />
</form>
您試圖上傳到哪個區域? 2014年1月以後部署的地區僅支持AWS Signature V4。我不相信您用來執行簽名的S3封裝CFC也支持AWS Signature V4。 – Brian
brightcove網站說: 目前DI只能從爲AWS簽名版本2配置的區域提取介質。在進一步注意之前,請使用其中一個區域。 – user2482479