No release in over 3 years
Low commit activity in last 3 years
Adds Atompub Media Resource strage support for the Paperclip
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Paperclip Atompub Storage¶ ↑

(Atompub Media Resource only.)

Installation¶ ↑

gem 'paperclip-atompub', '~> 0.0.1'

bundle exec rake paperclip_atompub:install:migrations
bundle exec rake db:migrate

Usage¶ ↑

Simple¶ ↑

class User < ActiveRecord::Base
  attr_accessible :name, :avatar
  has_attached_file :avatar,
    :storage => :atompub,
    :atompub_config => {
      :service_uri => 'http://atompub.host/atomsvc',
      :media_collection_uri => 'http://atompub.host/resources'
    },
    :atompub_credentials => {
      :username => 'USERNAME',
      :password => 'PASSWORD'
    },
    :styles => { :medium => "300x300>", :thumb => "100x100>" }
end

Dynamic Credentials¶ ↑

:atompub_credentials => lambda { |attachment|
  user = attachment.instance # => #<User id:1>
  { :username => user.atompub_username, :password => user.atompub_password }
},

Contributing to paperclip-atompub¶ ↑

Fork, fix, then send me a pull request.

Copyright© 2012 Yuichi Takeuchi, released under the MIT license