我在此处http://cloudinary.com/documentation/rails_carrierwave
为Cloudinary创建了一个Carrierwave上传器看起来像这样:
class MatePictureUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
def public_id
"mate/picture/#{model.id}"
end
version :thumb do
process :resize_to_fill => [110, 110, :north]
end
end
现在我想传递&#34;备份&#34;上传选项,以便cloudinary保留其版本(我不想在我的Cloudinary帐户上全局激活该选项)。
感谢您的帮助!
答案 0 :(得分:1)
可以使用cloudinary_transformation
方法将选项传递给Cloudinary。
对于&#34;备份&#34;选项,它看起来像这样:
class MatePictureUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
cloudinary_transformation backup: true
def public_id
"mate/picture/#{model.id}"
end
version :thumb do
process :resize_to_fill => [110, 110, :north]
end
end