For various reasons, I made a git branch and installed Paperclip in place of attachment_fu. Paperclip works great except that images seem to have lost some quality; edges have gone a little too jaggy to be able to drop attachment_fu just yet. After a post on the Paperclip Google Group, someone suggested the :convert_options could be passed additional attributes, like ''quality'', and could make a difference. I''ve attempted to pass these options across, but, they don''t seem to work; I''m probably sending them incorrectly because visually obvious options, like ''rotate'', clearly don''t do anything (or throw any errors, either). Does anyone know what I''m doing wrong here (?); # Attempt no.1 has_attached_file :avatar, :convert_options => { :rotate => "-rotate -90" }, :styles => { :thumb_45 => ''45x45#''.... # Attempt no.2 :convert_options => { :rotate => "-rotate ''-90''" } # Attempt no.3 :convert_options => { :rotate => "-90" } # Attempt no.4 :convert_options => { :rotate => -90 } Also, attachment_fu was really easy to set up with S3. I followed a tutorial from Railsforum (1.), and got it working first time. I''ve read through the Paperclip docs (2.), but I find the RDocs format to be pretty inaccessible for a newbie (does ''+s3_credentials+'' equate to :s3_credentials, as a symbol?), so I haven''t worked out how to use Paperclip with S3 or found a tutorial from which I could probably learn how to do so. Does anyone know, a) how to include the S3 options and configure paperclip to send images over to S3, and, b) if I''ll get good results (searching the Paperclip google groups suggests that there could be some issues with paperclip & S3)? 1. http://railsforum.com/viewtopic.php?id=17815 2. http://dev.thoughtbot.com/paperclip/ Any help is tres appreciated (that''s an understatement). p.s. another dev (not working on the app anymore) set up some European buckets, and I want to delete them - but the S3Browser keeps telling me ''Redirected to Nowhere'' whenever I try to do so - any ideas on how to fix that?. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
here''s how to use convert_options from the comments in paperclip.rg: has_attached_file :avatar, :styles => { :large => "300x300", :negative => "100x100" } :convert_options => { :all => "-strip", :negative => "-negate" } On Sep 2, 8:45 am, Neil Cauldwell <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> For various reasons, I made a git branch and installed Paperclip in > place of attachment_fu. Paperclip works great except that images seem to > have lost some quality; edges have gone a little too jaggy to be able to > drop attachment_fu just yet. After a post on the Paperclip Google Group, > someone suggested the :convert_options could be passed additional > attributes, like ''quality'', and could make a difference. I''ve attempted > to pass these options across, but, they don''t seem to work; I''m probably > sending them incorrectly because visually obvious options, like > ''rotate'', clearly don''t do anything (or throw any errors, either). Does > anyone know what I''m doing wrong here (?); > > # Attempt no.1 > has_attached_file :avatar, :convert_options => { :rotate => "-rotate > -90" }, > :styles => { > :thumb_45 => ''45x45#''.... > > # Attempt no.2 > :convert_options => { :rotate => "-rotate ''-90''" } > > # Attempt no.3 > :convert_options => { :rotate => "-90" } > > # Attempt no.4 > :convert_options => { :rotate => -90 } > > Also, attachment_fu was really easy to set up with S3. I followed a > tutorial from Railsforum (1.), and got it working first time. I''ve read > through the Paperclip docs (2.), but I find the RDocs format to be > pretty inaccessible for a newbie (does ''+s3_credentials+'' equate to > :s3_credentials, as a symbol?), so I haven''t worked out how to use > Paperclip with S3 or found a tutorial from which I could probably learn > how to do so. Does anyone know, a) how to include the S3 options and > configure paperclip to send images over to S3, and, b) if I''ll get good > results (searching the Paperclip google groups suggests that there could > be some issues with paperclip & S3)? > > 1.http://railsforum.com/viewtopic.php?id=17815 > > 2.http://dev.thoughtbot.com/paperclip/ > > Any help is tres appreciated (that''s an understatement). > > p.s. another dev (not working on the app anymore) set up some European > buckets, and I want to delete them - but the S3Browser keeps telling me > ''Redirected to Nowhere'' whenever I try to do so - any ideas on how to > fix that?. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Keith Norman wrote:> here''s how to use convert_options from the comments in paperclip.rg: > > has_attached_file :avatar, :styles => { :large => "300x300", :negative > => "100x100" } > :convert_options => { > :all => "-strip", > :negative => "-negate" > } > > On Sep 2, 8:45 am, Neil Cauldwell <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>Thanks Keith, I''m almost 100% done with implementing Paperclip, I just need to mock the calls to S3 and make at a background worker for pushing to S3 instead of tying up mongresl (the later won''t be so easy). I mentioned the aliasing issue to the guys at thoughtbot - they suggested trying a different cropping method. I found that ''scale'' seemed to give a much nicer cropping conversion quality (had to dig in to the paperclip.rb to get at it, I just couldn''t work out the convert options), so they pushed it in as the default for Paperclip. It doesn''t seem to work well when converting PNG to jpg, but that''s something I can live with. They also implemented buckets on a per environment basis using the yml config. So I''m really happy with it now, much easier than attachment fu. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Oct 1, 2008 at 12:05 PM, Neil Cauldwell < rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Keith Norman wrote: > > here''s how to use convert_options from the comments in paperclip.rg: > > > > has_attached_file :avatar, :styles => { :large => "300x300", :negative > > => "100x100" } > > :convert_options => { > > :all => "-strip", > > :negative => "-negate" > > } > > > > On Sep 2, 8:45 am, Neil Cauldwell <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > > Thanks Keith, I''m almost 100% done with implementing Paperclip, I just > need to mock the calls to S3 and make at a background worker for pushing > to S3 instead of tying up mongresl (the later won''t be so easy). > > ...Both backgroundjob and spawn are great ways to do this. I use both to great affect to do the same thing. -- Benjamin Curtis http://railskits.com/ - Ready-made Rails code http://catchthebest.com/ - Team-powered recruiting http://www.bencurtis.com/ - Personal blog --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Benjamin Curtis wrote:> On Wed, Oct 1, 2008 at 12:05 PM, Neil Cauldwell < > rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> > >> > On Sep 2, 8:45 am, Neil Cauldwell <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> >> >> Thanks Keith, I''m almost 100% done with implementing Paperclip, I just >> need to mock the calls to S3 and make at a background worker for pushing >> to S3 instead of tying up mongresl (the later won''t be so easy). >> >> ... > > > Both backgroundjob and spawn are great ways to do this. I use both to > great > affect to do the same thing. > > -- > Benjamin Curtis > http://railskits.com/ - Ready-made Rails code > http://catchthebest.com/ - Team-powered recruiting > http://www.bencurtis.com/ - Personal blogThanks. I was thinking it would mean storing locally and moving to S3 in the background; someone seems to have taken the same approach in a thread on the Paperclip google group (although there''s 0 responses so I don''t know how they got on with it); http://groups.google.com/group/paperclip-plugin/browse_thread/thread/8af52cc25cd97d02/05221d1a7254601d?lnk=gst&q=background#05221d1a7254601d There''s an interesting presentation on starling, workling, spawn etc (among other background workers) which got me thinking about going with something other than backgroundrb; http://www.slideshare.net/purzelrakete/railsconf-berlin-04092008-presentation?src=embed ...but I just got off the phone with an engine yard account manager for my app and I''m waiting to see what their devs have to say about. Apparently they have quite a few apps pushing content to S3, so it''s something they can help out with; I''m not sure how far they can get in separating out processes to async processes (I have tons of specs, but still), but maybe I won''t need to write it all from scratch. I think this would make a pretty good screencast for someone to make (and charge for). I''d pay $5 - 10 to see how a pro installs a user avatar (probably the most common image upload), sets all the right defaults for paperclip, makes it all secure, sets up decent spec coverage, asyncs it with S3 (again, which good spec coverage) and makes it manageable over dev, test, staging, production environments. I''ve done most of it, but, I would still pay to watch an expert implement it using best practices. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---