Paperclip CloudFiles?

356 views Asked by At

How can I use Paperclip with CloudFiles? I found paperclip-cloudfiles, but in the description it says it will probably be removed and the last commit was in 2010.

1

There are 1 answers

0
Param On BEST ANSWER

Gemfile:

gem 'fog'

config/environments/production.rb

Paperclip::Attachment.default_options.update({
:path             => ":picturable_name/:basename_:style.:extension",
:storage          => :fog,
:fog_credentials  => {
  :provider           => 'Rackspace',
  :rackspace_username => RACKSPACE_USERNAME,
  :rackspace_api_key  => RACKSPACE_API_KEY,
  :persistent         => false
},
:fog_directory    => CONTAINER_NAME,
:fog_public       => true
})