I tried in vain for 2 days to make a simple download to my Amazon S3 bucket. Below is my visual form:
<form action="http://s3.amazonaws.com/MYBUCKETNAME" method="post" enctype="multipart/form-data"> <input type="hidden" name="AWSAccessKeyId" value="MYACCESSKEY" /> <input type="hidden" name="acl" value="private" /> <input type="hidden" name="key" value="UserUploads/TestUser/${filename}" /> <input type="hidden" name="success_action_redirect" value="http://WWW.MYURL.COM/" /> <input type="hidden" name="policy" value="POLICY" /> <input type="hidden" name="signature" value="SIGNATURE" /> <div> Please specify a file, or a set of files: <input type="file" name="file" size="100" /> </div> <input type="submit" value="Upload" /> </form>
and my political document is as follows:
{ expiration = "2011-12-08T12:00:00.000Z", conditions = [ ["eq","bucket","MYBUCKETNAME"], ["eq","acl","private"], ["starts-with","$key","UserUploads/TestUser/"], ["eq","success_action_redirect", "HTTP://WWW.MYURL.COM/"] ] }
I get the following error: Code: AccessDenied, Message: Invalid according to the policy: The status of the policy is not fulfilled: ["eq", "bucket", "MYBUCKETNAME"]
Does anyone have any ideas, I grab hold of a straw here. Also not sure my bucket and ACL policies are correct.
source share