carrierwave

https://github.com/carrierwaveuploader/carrierwave

Ruby

Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks

CarrierWave::Uploader::Configuration::ClassMethods#storage=

Sets the storage engine to be used when storing files with this uploader.
Can be any class that implements a #store!(CarrierWave::SanitizedFile) and a #retrieve!
method. See lib/carrierwave/storage/file.rb for an example. Storage engines should
be added to CarrierWave::Uploader::Base.storage_engines so they can be referred
to by a symbol, which should be more convenient

If no argument is given, it will simply return the currently used storage engine.

=== Parameters

[storage (Symbol, Class)] The storage engine to use for this uploader

=== Returns

[Class] the storage engine to be used with this uploader

=== Examples

    storage :file
    storage CarrierWave::Storage::File
    storage MyCustomStorageEngine

Source | Google | Stack overflow

Edit

git clone [email protected]:carrierwaveuploader/carrierwave.git

cd carrierwave

open lib/carrierwave/uploader/configuration.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-CarrierWave--Uploader--Configuration--ClassMethods-storage--for-pr


# Commit to git

git add lib/carrierwave/uploader/configuration.rbgit commit -m "better docs for CarrierWave::Uploader::Configuration::ClassMethods#storage="


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-CarrierWave--Uploader--Configuration--ClassMethods-storage--for-pr

hub pull-request


# Celebrate!