carrierwave
https://github.com/carrierwaveuploader/carrierwave
Ruby
Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
CarrierWave::Uploader::Cache::ClassMethods#clean_cached_files!
Removes cached files which are older than one day. You could call this method from a rake task to clean out old cached files. You can call this method directly on the module like this: CarrierWave.clean_cached_files! === Note This only works as long as you haven't done anything funky with your cache_dir. It's recommended that you keep cache files in one place only.
Edit
git clone [email protected]:carrierwaveuploader/carrierwave.git
cd carrierwave
open lib/carrierwave/uploader/cache.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-CarrierWave--Uploader--Cache--ClassMethods-clean_cached_files--for-pr
# Commit to gitgit add lib/carrierwave/uploader/cache.rbgit commit -m "better docs for CarrierWave::Uploader::Cache::ClassMethods#clean_cached_files!"
# 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--Cache--ClassMethods-clean_cached_files--for-pr
hub pull-request
# Celebrate!