This may be a problem with your HTML FORM action.
The action specifies the URL that processes the request, which must be set to the URL of the bucket. For example, if the name of your bucket is "johnsmith", the URL is "http://johnsmith.s3.amazonaws.com/".
Please check this documentation for AMAZON S3 documentation for more details: http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTForms.html#HTTPPOSTFormDeclaration
There is another article on this. Amazon S3 - HTTPS / SSL - Is it Possible?
UPDATE: I was able to upload objects to the SSL bucket over SSL using this HTML and policy. Check the action of the form.
Politics:
{ "expiration": "2012-06-04T12:00:00.000Z", "conditions": [ {"bucket": "<YourBucketName>" }, {"acl": "public-read" }, ["eq", "$key", "testImage.jpg"], ["starts-with", "$Content-Type", "image/jpeg"], ] }
HTML:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <form action="https://s3.amazonaws.com/<YourBucketName>/" method="post" enctype="multipart/form-data"> <input type="text" name="key" value="testImage.jpg" /> <input type="text" name="acl" value="public-read" /> <input type="text" name="content-type" value="image/jpeg" /> <input type="hidden" name="AWSAccessKeyId" value="<YOUR ACCESS KEY>" /> <input type="hidden" name="policy" value="<YOUR GENERATED POLICY>" /> <input type="hidden" name="signature" value="<YOUR GENERATED SIGNATURE>" /> <input name="file" type="file" /> <input name="submit" value="Upload" type="submit" /> </form> </body> </html>
You must know how to create a coded policy and signature.
source share