Skip to content

About

Dropbox storage support for paperclip file attachment

Resources

Stars

3 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

Dropbox storage support for paperclip file attachment plugin.

You can let bundler install Paperclip Dropbox Plugin by adding this line to your application’s Gemfile:

gem 'paperclipdropbox'

And then execute:

bundle install

Or install it yourself as:

gem install paperclipdropbox

Then create the paperclipdropbox.yml file and run the authotization rake task

rake paperclipdropbox:authorize

you’ll then be given a url to login to dropbox to authorize this plugin access to your dropbox account.

In your model:

class User < ActiveRecord::Base
  has_attached_file :avatar,
                    :styles => { :medium => "300x300>", :thumb => "100x100>" },
                    :storage => :Dropboxstorage,
                    :path => "/:attachment/:attachment/:id/:style/:filename"
end

Create the file config/paperclipdropbox.yml:

development:
  dropbox_key: user_email
  dropbox_secret: user_password
  path: "/:attachment/:attachment/:id/:style/:filename"
test:
  ...
production:
  ...

You can add the path option to the config/paperclipdropbox.yml file for ease of use.

About

Dropbox storage support for paperclip file attachment

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages