1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Only use S3 for development and production

This commit is contained in:
Daniel Barber 2015-10-14 12:39:56 +01:00
parent c146a90e03
commit 39f60a5f52

View File

@ -9,11 +9,17 @@ Dragonfly.app.configure do
url_format "/media/:job/:name"
datastore :s3,
bucket_name: ENV['AWS_BUCKET'],
access_key_id: ENV['AWS_KEY'],
secret_access_key: ENV['AWS_SECRET'],
region: 'eu-west-1'
if Rails.env.in?(%w(development production))
datastore :s3,
bucket_name: ENV['AWS_BUCKET'],
access_key_id: ENV['AWS_KEY'],
secret_access_key: ENV['AWS_SECRET'],
region: 'eu-west-1'
else
datastore :file,
root_path: Rails.root.join('public/system/dragonfly', Rails.env),
server_root: Rails.root.join('public')
end
processor :preview do |content| content.process! :thumb, '600x600' end