In my initializers/dragonfly.rb
I put this:
require 'dragonfly/rails/images'
app = Dragonfly[:app_name]
app.datastore = Dragonfly::DataStorage::S3DataStore.new({
:bucket_name => 'bucket_name',
:access_key_id => 'key...',
:secret_access_key => 'key...'
})
But doesn't work, app still saving files in local. What I missing?
EDIT: I changed Dragonfly[:app_name]
to Dragonfly[:images]
and it works. Why I need to set :images
, if I can upload any type of files?