![]() Public_read_write: Owner gets FULL_CONTROL, the anonymous principal is granted READ and WRITE access. If this policy is used on an object, it can be read from a browser with no authentication. Public_read: Owner gets FULL_CONTROL and the anonymous principal is granted READ access. However, you can override this with the config: s3_permission: public_read Setting permissions on uploaded s3 objectsīy default, jammit-s3 uses the permission setting found on the s3 bucket. However you can customize this using the s3_upload_files setting, which should be a list of file globs. bash_profile Folders to uploadīy default, jammit-s3 will upload your configured asset directly, along with public/images. You can then set these env variables in your. Replace these with your own access keys, found here.Īs you probably don't want to check this data into source control, I'd recommend you just set it to an environment variable on your local box, and use ERB s3_access_key_id: S3_secret_access_key: 1TzRlDmuH8DoOlJ2tlwW8qx+i+Pfe0jzIouWI2BL Set your authenticaton information within config/assets.yml s3_access_key_id: 03HDMNF59CWZ2J24T702 If using it in the context of your Rails3 app, I'd recommend using bundle exec bundle exec jammit-s3 To deploy your files to s3, just the jammit-s3 command at your project's root. Learn more about bucketnames here s3_bucket: my-awesome-jammit-bucket If jammit-s3 doesn't find the bucket, it will try to create it. Within your config/assets.yml, just add a toplevel key called s3_bucket that contains the bucketname you want to use. Jammit S3 already has a gem dependency for jammit, so I'd recommend removing any existing gem 'jammit' references from your Gemfile. If you are using Rails3, add it to your project's Gemfile: gem 'jammit-s3' To install jammit-s3, just use: gem install jammit-s3 jammit-s3 includes a script you can use as a hook to recompile and upload all your assets. It's especially great for Heroku user who use generated assets such as coffee-script and sass. ![]() Jammit S3 is a jammit wrapper that provides appropriate hooks so you can easily deploy your assets to s3/cloudfront
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |