我試圖使用亞馬遜網絡服務上傳文件,但我得到這個錯誤,如下圖所示,因爲其中的文件不會被上傳到服務器:將文件上傳到亞馬遜Web服務器
{
"data": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>AccessDenied</Code><Message>Invalid according to Policy: Policy Condition failed: [\"starts-with\", \"$filename\", \"\"]</Message><RequestId>7A20103396D365B2</RequestId><HostId>xxxxxxxxxxxxxxxxxxxxx</HostId></Error>",
"status": 403,
"config": {
"method": "POST",
"transformRequest": [null],
"transformResponse": [null],
"url": "https://giblib-verification.s3.amazonaws.com/",
"data": {
"key": "@usc.edu/1466552912155.jpg",
"AWSAccessKeyId": "xxxxxxxxxxxxxxxxx",
"acl": "private",
"policy": "xxxxxxxxxxxxxxxxxxxxxxx",
"signature": "xxxxxxxxxxxxxxxxxxxx",
"Content-Type": "image/jpeg",
"file": "file:///storage/emulated/0/Android/data/com.ionicframework.giblibion719511/cache/1466552912155.jpg"
},
"_isDigested": true,
"_chunkSize": null,
"headers": {
"Accept": "application/json, text/plain, */*"
},
"_deferred": {
"promise": {}
}
},
"statusText": "Forbidden"
}
誰能告訴我什麼是禁止403響應的原因?在此先感謝
慢下來。 'AWSAccessKeyId'是**不**敏感數據。簽名或政策也不是。我看到的帖子中沒有任何敏感內容,甚至在它被編輯之前。這是上傳後的標準表單,設計爲可以在網站的HTML中顯示,也可以是公開的。 –