No commit activity in last 3 years
No release in over 3 years
Fuzzy storage support for carrierwave
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.10.0
 Project Readme

Fuzzy Storage for CarrierWave

https://github.com/FjordSoftware/carrierwave-fuzzy-storage

Getting started

Add carrierwave-fuzzy-storage to your Gemfile

gem 'carrierwave-fuzzy-storage', '~> 0.1.0'

run bundle install

Create or modify existing uploader:

class AttachmentUploader < CarrierWave::Uploader::Base
  storage CarrierWave::Storage::Fuzzy

  # ...
end

Finally in your ActiveRecord models add something like:

class Attachment < ApplicationRecord
  include CarrierWave::FuzzyStorage::ActiveRecordSupport.new('aws', :file)

  mount_uploader :file, AttachmentUploader
end

Your models need to respond to #file_storage method (note that file is the name of attribute on which uploader is mounted).

Carrierwave fuzzy storage doesn't support moving files between storages, yet. Currently it only supports storing files on various storages supported by carrier wave (s3/file). This allows some files to be kept on disk while some files being kept in s3.

Including CarrierWave::FuzzyStorage::ActiveRecordSupport is optional. First argument is default storage and all other arguments are uploader mounts.

TODO

Write some tests