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:
parent
c146a90e03
commit
39f60a5f52
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user