I\'m using CarrierWave for my file uploads in Rails 3.1, and I\'m looking for a way to save server space. Many of the photos being uploaded are upwards of 20MB, so after pro
You could define an after_save callback in you model and delete the photo..
I dont know your model but something like this may work if you customize it:
class User << ActiveRecord::Base
after_create :convert_file
after_create :delete_original_file
def convert_file
# do the things you have to do
end
def delete_original_file
File.delete self.original_file_path if File.exists? self.original_file_path
end
end