Hi,

Thanks for implementing this module and it works great until I add a bucket policy to restrict my Amazon s3 content from hot linking. I added a bucket policy to allow the files to view when referring only from my website. (I had to add an 'allow' and 'deny' statements to the policy). But after adding the policy, when I try to upload a file from Drupal, I get an error Warning: filesize(): stat failed for s3 error.

I confirmed this by removing the bucket policy and uploading a file. It didn't give any error. Could anyone help me to resolve this issue?

Also I noticed that it doesn't give any error when I remove the "deny" statement from the policy. But then anyone can access my S3 content.

Please help.

Thanks

Comments

lavms’s picture

Issue summary: View changes
lavms’s picture

After reading https://drupal.org/node/1526848, I manually changed the AmazonS3StreamWrapper so that the files upload via Amazon s3 are private and added a bucket policy to "allow" others to view the files stored in S3 when referring from my website only. So far, it works as I expected.

lavms’s picture

Status: Active » Closed (fixed)