Carrierwave and mini_magick finding widths & height

后端 未结 4 1022
慢半拍i
慢半拍i 2021-02-06 12:30

After a bit of investigation I decided to use Carrierwave and mini_magick on my new rail3 app.

I\'ve set it up and it works perfectly. However I have a one question. I\

4条回答
  •  清酒与你
    2021-02-06 12:48

    Just for record, I have used a similar solution, however using files with Mongo GridFS, here it goes:

      def image
        @image ||= MiniMagick::Image.read(Mongo::GridFileSystem.new(Mongoid.database).open(file.path, 'r'))
      end
    

提交回复
热议问题