RoR从cloudinary迁移到carrierwave

时间:2014-12-24 15:53:11

标签: ruby-on-rails carrierwave cloudinary

由于我们不再使用cloudinary,如何将所有云图片迁移到carrierwave

有一个tutorial用于迁移 cloudinary,但不是落后的。 有人可以帮忙吗?

谢谢!

1 个答案:

答案 0 :(得分:2)

我最终得到了类似的东西:

1)生成图像上传器

Sub color2()
   Dim myRange As Range, valuee As String
   valuee = InputBox("Search String:")
   If valuee = vbNullString Then Exit Sub

   Range("A1").Select
   Range(Selection, Selection.End(xlToRight)).Select
   Range(Selection, Selection.End(xlDown)).Select

   Set myRange = Selection.Find(what:=valuee, after:=Selection(1))
   If myRange Is Nothing Then
      MsgBox "no value"
      Exit Sub
   End If
   myRange.Interior.ColorIndex = 3
   st = myRange.Address(0, 0)

   Do Until myRange Is Nothing
      Set myRange = Selection.FindNext(after:=myRange)
      If myRange.Address(0, 0) = st Then Exit Do
      myRange.Interior.ColorIndex = 3
   Loop
End Sub

2)创建了rake-task # encoding: utf-8 class GiftImageUploader < CarrierWave::Uploader::Base storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" end

lib/tasks/pictures.rake

这对我来说很成功。