carrierwave
https://github.com/carrierwaveuploader/carrierwave
Ruby
Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
CarrierWave::Uploader::Configuration::ClassMethods#cache_storage
Sets the cache storage engine to be used when storing cache files with this uploader.
Same as .storage except for required methods being #cache!(CarrierWave::SanitizedFile),
#retrieve_from_cache! and #delete_dir!.
=== Parameters
[storage (Symbol, Class)] The cache storage engine to use for this uploader
=== Returns
[Class] the cache storage engine to be used with this uploader
=== Examples
cache_storage :file
cache_storage CarrierWave::Storage::File
cache_storage MyCustomStorageEngineEdit
git clone [email protected]:carrierwaveuploader/carrierwave.git
cd carrierwave
open lib/carrierwave/uploader/configuration.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CarrierWave--Uploader--Configuration--ClassMethods-cache_storage-for-pr
# Commit to gitgit add lib/carrierwave/uploader/configuration.rbgit commit -m "better docs for CarrierWave::Uploader::Configuration::ClassMethods#cache_storage"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-CarrierWave--Uploader--Configuration--ClassMethods-cache_storage-for-pr
hub pull-request
# Celebrate!