如果我上传图像,则会创建原始版本和拇指版本,但拇指版本未保存在数据库中。
class Image < ActiveRecord::Base
mount_uploader :image, ImageUploader
end
# encoding: utf-8
class ImageUploader < CarrierWave::Uploader::Base
# Create different versions of your uploaded files:
version :thumb do
process :resize_to_limit => [50, 50]
end
end