dragonfly-gem

Multi file upload with rails_admin (Carrierwave, Paperclip, Dragonfly)

北城以北 提交于 2019-12-06 20:40:29
I'm looking for a quick solution for multi file upload with rails_admin. Any ideas or solutions out there? The approach I'd take here is to develop a custom action which would include it's own view and controller processing. You can generate a rails_admin plugin with the directions at the top of the page here . And here are some examples of custom actions I've built out: Import Print to PDF The import plugin has a supporting blog article here . This is the file you want to look at where you add your upload behavior inside the :controller instance option. 来源: https://stackoverflow.com/questions

undefined method 'dragonfly_accessor'

我的梦境 提交于 2019-12-06 08:27:11
问题 I am new to dragonfly and trying to go through the setup directions on the main documentation page for rails. Not using Active Record. My steps: 1) add to Gemfile gem 'dragonfly', "~>1.0.3" 2) bundle install 3) rails g dragonfly created initializers/dragonfly.rb 4) model class Post include Mongoid::Document dragonfly_accessor :image field :title, type: String field :body, type: String end 5) controller params.require(:post).permit(:title, :body, :image) Just running mongod and rails s, I get

multiple image upload with dragonfly

旧时模样 提交于 2019-12-04 21:04:02
问题 i was trying for multiple image upload with dragonfly in rails3. i searched for some tutorials, but couldn't find any. i found a tutorial for multiple image upload with Carrierwave, but couldnt find luck with dragonfly .. any help please :) 回答1: Preface Dragonfly itself can be used to manage media for your project in general, similar to paperclip. The question itself boils down to the multiple file upload within a rails application. The some tutorials on this topic available, which can easily

Crop circular image with dragonfly rails

笑着哭i 提交于 2019-12-04 17:10:23
I'm using dragonfly ~> 0.9.15 Given an image, I'm confused at how to use the convert method in dragonfly to crop a circular portion from the image with transparent background. I am able to use a direct image magick command to run it from command line but the example command I found uses actual files and I'm unaware of how to get the file while dragonfly processes it on the fly. Here's the actual command I took from a stack overflow question with imagemagick. https://stackoverflow.com/a/999563/1664852 convert -size 200x200 xc:none -fill walter.jpg -draw "circle 100,100 100,1" circle_thumb.png

undefined method 'dragonfly_accessor'

有些话、适合烂在心里 提交于 2019-12-04 12:49:54
I am new to dragonfly and trying to go through the setup directions on the main documentation page for rails. Not using Active Record. My steps: 1) add to Gemfile gem 'dragonfly', "~>1.0.3" 2) bundle install 3) rails g dragonfly created initializers/dragonfly.rb 4) model class Post include Mongoid::Document dragonfly_accessor :image field :title, type: String field :body, type: String end 5) controller params.require(:post).permit(:title, :body, :image) Just running mongod and rails s, I get the error of undefined method 'dragonfly_accessor' Any ideas what I am missing? Also, the user’s error

Carrierwave or Dragonfly

自闭症网瘾萝莉.ら 提交于 2019-11-28 18:47:32
问题 I have been looking into rails file upload tools and the ones that seemed the most appealing and interesting to me were carrierwave and dragonfly. From looking around it seems like carrierwave takes the more traditional style where you can process the file on save whereas dragonfly is middleware so it allows you to process on the fly. I was wondering if people had any references to performance test or any test that compare the two. Also, just curious on what people's opinions are about both

Rails 3 + JQuery-File-Upload + Nested Model

北慕城南 提交于 2019-11-28 03:52:16
I've been searching for some examples, but have come up short: I'm trying to implement JQuery-File-Upload on a project I'm working on, but am getting lost as to how to get it to work with nested attributes. Quick overview: 2 Models: Comment [has_many :attachments] Attachment [belongs_to :comment] Comment accepts_nested_attributes_for :attachments . Also - I'm using Dragonfly. I've reviewed the Rails 3 guides on the JQuery-File-Upload site, but they assume it's a singular model, so it's all built around a form. Does anyone have any examples of their implementation or is there an existing

Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu [closed]

眉间皱痕 提交于 2019-11-27 03:00:53
I'm working on upgrading a Rails 2.3.11, Ruby 1.9.2 app to Rails 3.0.10, and attachment_fu no longer works. I'm looking at changing to paperclip, carrierwave, or dragonfly for file uploads, or maybe a Rails 3 compatible, maintained version of attachment_fu. Which of these options would be the best to use in terms of performance, how well maintained it is, how easy it is to upgrade from attachment_fu, and maybe is it going to be Rails 3.1 compatible? What are the major strengths and disadvantages of each one? Any insight would be appreciated. I've used both Paperclip and Carrierwave, and if I

Rails 3 + JQuery-File-Upload + Nested Model

↘锁芯ラ 提交于 2019-11-27 00:12:28
问题 I've been searching for some examples, but have come up short: I'm trying to implement JQuery-File-Upload on a project I'm working on, but am getting lost as to how to get it to work with nested attributes. Quick overview: 2 Models: Comment [has_many :attachments] Attachment [belongs_to :comment] Comment accepts_nested_attributes_for :attachments . Also - I'm using Dragonfly. I've reviewed the Rails 3 guides on the JQuery-File-Upload site, but they assume it's a singular model, so it's all

Rails 3 paperclip vs carrierwave vs dragonfly vs attachment_fu [closed]

泄露秘密 提交于 2019-11-26 10:21:10
问题 I\'m working on upgrading a Rails 2.3.11, Ruby 1.9.2 app to Rails 3.0.10, and attachment_fu no longer works. I\'m looking at changing to paperclip, carrierwave, or dragonfly for file uploads, or maybe a Rails 3 compatible, maintained version of attachment_fu. Which of these options would be the best to use in terms of performance, how well maintained it is, how easy it is to upgrade from attachment_fu, and maybe is it going to be Rails 3.1 compatible? What are the major strengths and