jnicklas/carrierwave — pull request #516 by jasonsydes (2011-11-04 21:56:37+00:00)
Title: For large files, support optional moving of files into cache and store instead of copying.

This commit adds two config options, "move_into_cache" and "move_into_store", by default set to false to retain the normal behavior. If either is set to true, then adding a file to the cache or store will respectively be done by moving the file instead of copying it.

This is important for large files. Without these options, files are copied twice (one when adding to the cache, and once when adding to the store), which for large files can be very time consuming. I'm using carrierwave to manage files that are up to 10GB in size. Being able to quickly add existing files via carrierwave over the Rails console is important for maintenance of my application.

This commit uses the pre-existing CarrierWave::SanitizedFile#move_to() method that apparently wasn't being used anywhere yet.