Steps to make the example work:
- Make sure you have the HAML gem installed
- Add your s3 bucket and keys to config/amazon_s3.yml
- Make sure a public readable crossdomain.xml exists in the s3 bucket you specified in config/amazon_s3.yml, with the following content (you can also limit access to your domain to be more secure):
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*" secure="false" /> </cross-domain-policy>
- Also make sure a folder named ‘test’ exists in that bucket. Files will be uploaded to that folder.