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 processing them down to 1024 x 1024, I would like to remove the original. Is there any easy way to do that in the uploader class?
Thanks, --Mark
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:
I used to have two versions and realized that I did not not need the original
So instead of having
I removed :normal and added this
Now the original is saved in size I need and I don't have a third unused image on the server
everyone! Selected solution does not work for me. My solution:
It's a little bit hack but has performance advantage