No commit activity in last 3 years
No release in over 3 years
Save your image attachments in http://flickr.com/ using Carrierwave
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 0.2.3
~> 10.0
= 3.6.0.beta2
~> 1.3

Runtime

 Project Readme

Carrierwave::Flickr

Why do you need this library?

  • You want to store images in a fast and highly available storage
  • You want photos to be publicly available in the Internet

Installation

Add this line to your application's Gemfile:

gem 'carrierwave-flickr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install carrierwave-flickr

Usage

Put these lines in your carriervawe initializer

CarrierWave.configure do |config|
  config.flickr_credentials = {
    key: 'YOUR_API_KEY',
    secret: 'YOUR_SECRET',
    oauth_token: 'YOUR_TOKEN',
    oauth_token_secret: 'YOUR_TOKEN_SECRET'
  }
end

This library uses flickraw under the hood. See its Authentication section to obtain secret and token

If you want all photos to be stored in a specific album you can specify it

CarrierWave.configure do |config|
  config.flickr_credentials = {
    ...
    album: 'YOUR_ALBUM_ID'
  }
end

If you want to store photo sizes configure the column where to put them

CarrierWave.configure do |config|
  config.store_flickr_photo_sizes = :sizes
end

To get an URL to the photo of a different format you can use

  avatar.image.url(format: :square)

The list of available formats you can find there

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hirurg103/carrierwave-flickr.

License

The gem is available as open source under the terms of the MIT License.