How can I make carrierwave not save the original file after versions are processed?

前端 未结 5 1158
广开言路
广开言路 2020-12-16 04:17

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

5条回答
  •  攒了一身酷
    2020-12-16 04:47

    It's a little bit hack but has performance advantage

    my_uploader.send :store_versions!, open(my_file)
    

提交回复
热议问题