Giter Site home page Giter Site logo

paperclipdropbox's Introduction

PaperclipDropboxStorage

Dropbox storage support for paperclip file attachment plugin.

Install

Rails 3

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.

Usage

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

Optional

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.

paperclipdropbox's People

Stargazers

Markus Lachinger avatar

Watchers

James Cloos avatar Markus Lachinger avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.