From 97c269dfb3b3d1a5ed0bce055c8fca69709e2010 Mon Sep 17 00:00:00 2001 From: duccioarmenise Date: Fri, 14 Sep 2012 14:05:44 +0300 Subject: [PATCH] Update doc/guides/7 - Hosting and Deployment/2 - Amazon S3 for Uploads.textile For some reason I had to configure my credential that way to solve this exact issue: https://github.com/refinery/refinerycms/issues/1278 --- .../2 - Amazon S3 for Uploads.textile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/guides/7 - Hosting and Deployment/2 - Amazon S3 for Uploads.textile b/doc/guides/7 - Hosting and Deployment/2 - Amazon S3 for Uploads.textile index f4901b908f..d8a1a3271c 100644 --- a/doc/guides/7 - Hosting and Deployment/2 - Amazon S3 for Uploads.textile +++ b/doc/guides/7 - Hosting and Deployment/2 - Amazon S3 for Uploads.textile @@ -50,6 +50,19 @@ ENV['S3_BUCKET']='fill_in_your_bucket_name_here' (Note: For Heroku, you should use config vars to set your environment variables, using Heroku's command line utility. See "Heroku's config vars documentation":http://devcenter.heroku.com/articles/config-vars.) +Another option, expecially if you experience Dragonfly::DataStorage::S3DataStore exceptions, is to configure +your Amazon S3 credential using the following syntax: + + +Refinery::Core.configure do |config| + config.s3_backend = true + config.s3_access_key_id = 'fill_in_your_key_here' + config.s3_secret_access_key = 'fill_in_your_secret_key_here' + config.s3_bucket_name = 'fill_in_your_bucket_name_here' + config.s3_region = 'fill_in_your_buckets_region_here' # this one's not always required, default is 'us-east-1' +end + + h3. Turning S3 on and off S3 should automatically sense that it is enabled based on these ENV variables