<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for mevans</title><link>http://disqus.com/by/mevans/</link><description></description><atom:link href="http://disqus.com/mevans/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 25 Feb 2015 17:23:57 -0000</lastBuildDate><item><title>Re: Defile: Fixing Ruby File Uploads</title><link>http://www.varvet.com/blog/68-defile-fixing-ruby-file-uploads#comment-1875605157</link><description>&lt;p&gt;Hi - this looks like a cool gem - nice one! I'm glad you've found dragonfly useful in creating it. For your info dragonfly does support form redisplays - &lt;a href="http://markevans.github.io/dragonfly/models/#retaining-across-form-redisplays" rel="nofollow noopener" target="_blank" title="http://markevans.github.io/dragonfly/models/#retaining-across-form-redisplays"&gt;http://markevans.github.io/...&lt;/a&gt; and direct uploads are quite easy as you use some js library to upload, then just set the model uid attribute with the s3 path, but I see with refile these things are more central/straightforward &lt;br&gt;Really nice idea including the Javascript for s3 upload within the library - looks pretty easy &lt;br&gt;Mark &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Wed, 25 Feb 2015 17:23:57 -0000</pubDate></item><item><title>Re: Notes from the open source battlefield</title><link>http://new-bamboo.co.uk/blog/2014/01/07/reflections-on-open-source#comment-1190577137</link><description>&lt;p&gt;haha you might be right! cheers mate&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Tue, 07 Jan 2014 10:38:03 -0000</pubDate></item><item><title>Re: Snake Game using HTML5 Canvas tag  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2009/12/31/html5-canvas-snake-game#comment-158933546</link><description>&lt;p&gt;Gordon - as you seem to be so knowledgeable about "good game structure" and javascript, maybe you'd like to spend hours of your time writing a tutorial on something cool and then releasing for the general public for free.&lt;/p&gt;&lt;p&gt;I don't think you're as knowledgeable about "being constructive", however, so maybe you should look at some of the other comments to see how it's done.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Wed, 02 Mar 2011 07:08:57 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-66980213</link><description>&lt;p&gt;@Millisami - see response on the google group.&lt;br&gt;I reckon the best way is to use the file data store for test/cucumber environments&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Sat, 07 Aug 2010 08:56:32 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-45121771</link><description>&lt;p&gt;@polarblau - It shouldn't try to create it every time - no. I haven't come across that before. Rather than reply here I've created a new thread in google groups - see here: &lt;a href="http://groups.google.com/group/dragonfly-users/browse_thread/thread/34dc29f9d869d039" rel="nofollow noopener" target="_blank" title="http://groups.google.com/group/dragonfly-users/browse_thread/thread/34dc29f9d869d039"&gt;http://groups.google.com/gr...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Fri, 16 Apr 2010 06:15:13 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-44412154</link><description>&lt;p&gt;@pke - yes absolutely - it's built for any content type, not just images. Obviously you'd have to implement your own processor (or by the sounds of it, just your own encoder), as there are no audio ones bundled with Dragonfly.&lt;/p&gt;&lt;p&gt;The only thing is I'd imagine the processing/encoding may take a while, so I don't know how well suited it would be to doing it on-the-fly. It would be cached after the first hit though&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Mon, 12 Apr 2010 05:55:05 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-42081842</link><description>&lt;p&gt;No they can't have the same name. If you want to use the same accessor, then configure the Dragonfly app for images, but also register the 'TransparentEncoder', so that non-image types have an encoder to handle them (which actually does nothing)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Mon, 29 Mar 2010 05:27:12 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-41944860</link><description>&lt;p&gt;@ncri - first point is a little tricky at the moment as it's not really meant for setting the uid directly. However I'll make some changes for allow for this in due course.&lt;br&gt;In the meantime it can work by not using the model attribute as an 'image accessor', but instead getting the image urls from the Dragonfly App directly, e.g.&lt;br&gt;Dragonfly::App[:images].url_for('your_s3_id', '300x200#', :png), etc.&lt;/p&gt;&lt;p&gt;as for your second point, yes, you can have as many accessors as you like and they can be linked to different Dragonfly apps. So you could configure one app for images (e.g. Dragonfly::App[:images]) , as above (or using an 'image_accessor' if you don't want to use that approach - see docs for using with AR), and another for general attachments (e.g. Dragonfly::App[:attachments]), using 'attachment_accessor' attributes ( see &lt;a href="http://markevans.github.com/dragonfly/file.ExampleUseCases.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.ExampleUseCases.html"&gt;http://markevans.github.com...&lt;/a&gt; for more info)&lt;/p&gt;&lt;p&gt;I don't quite understand what you said about your controller actions needing a sha! Yes, only image urls should need it. The only possible cause of this i can think of is that you don't have a 'path_prefix' set for your app. You need one to use in rails so that only urls under this prefix are handled by Dragonfly. See the docs for more details.&lt;br&gt;Hope that helps&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Sat, 27 Mar 2010 21:12:49 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-40009124</link><description>&lt;p&gt;If the initial build time is something you really wanted to avoid, then you could pre-cache the page at some point, e.g. when the image is changed, etc.&lt;/p&gt;&lt;p&gt;I guess there's no substitute for just trying out different things to suit your site's needs. &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Tue, 16 Mar 2010 08:19:32 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-39730789</link><description>&lt;p&gt;@Quentin - exactly - the point is to use a caching proxy like varnish in front of it on a big site.&lt;br&gt;Currently the header sent out is Cache-Control with a configurable age (defaults to 1 year). Which means that after the first time, the app isn't hit at all and images are served straight from Varnish.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Mon, 15 Mar 2010 05:43:42 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-39455827</link><description>&lt;p&gt;@Millisami - no. You can create a custom processor to do it yourself though.&lt;br&gt;(see &lt;a href="http://markevans.github.com/dragonfly/file.Processing.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.Processing.html"&gt;http://markevans.github.com...&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;If it's commonly needed then I may add one - feel free to fork the repository if you want one included.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Fri, 12 Mar 2010 20:21:01 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-39354793</link><description>&lt;p&gt;@zhenning - good question!&lt;br&gt;Actually there's built-in Denial-Of-Service protection for this very case.&lt;br&gt;Have a look at the bottom of  &lt;a href="http://markevans.github.com/dragonfly/file.GettingStarted.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.GettingStarted.html"&gt;http://markevans.github.com...&lt;/a&gt; - it adds an extra 'sha' parameter which uses a secret you can specify.&lt;/p&gt;&lt;p&gt;Which means that when it's turned on, if someone's tampered with the url then they'll get a 400 ("bad parameters") response.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Fri, 12 Mar 2010 05:17:46 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-37450642</link><description>&lt;p&gt;@needto - funnily enough someone else asked that - seems like a common use case - maybe it'll be worth me adding something to easily plug in to apps using Paperclip.&lt;/p&gt;&lt;p&gt;Anyway I think the best way is to create a custom datastore (should be fairly straightforward - see &lt;a href="http://markevans.github.com/dragonfly/file.DataStorage.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.DataStorage.html"&gt;http://markevans.github.com...&lt;/a&gt; ).&lt;/p&gt;&lt;p&gt;This datastore should map between 'uids' created by Paperclip (maybe the paperclip attachment.url ?) and the stored data.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Mon, 01 Mar 2010 07:09:44 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-35637142</link><description>&lt;p&gt;Update - I've just released version 0.5 which is Rails 3 compatible.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Sat, 20 Feb 2010 11:55:10 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-34251333</link><description>&lt;p&gt;@Alex - thanks for the tip. Out of interest do you know what the errors were related to?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Mon, 15 Feb 2010 05:45:14 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-29860025</link><description>&lt;p&gt;@justinwr - point us to the code if you can find it - good to get any ideas&lt;/p&gt;&lt;p&gt;@Peter - theoretically yes (fingers crossed!!), although I must admit I haven't actually tried it with edge rails. I'm pretty sure that the only thing that would change is using gem bundler instead of 'config.gem' (and then :lib =&amp;gt; 'dragonfly/rails/images' would change to :require_as =&amp;gt; 'dragonfly/rails/images' if you use it).&lt;/p&gt;&lt;p&gt;But I'll certainly check to make sure it works with Rails 3.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Thu, 14 Jan 2010 14:31:36 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-29834809</link><description>&lt;p&gt;Hi grimen - no it's definitely not dependent on RMagick.&lt;/p&gt;&lt;p&gt;I specifically designed it so that people who wanted to use ImageScience / Minimagick / etc. could do.&lt;/p&gt;&lt;p&gt;Which is why you need to do "config.gem 'rmagick', :lib =&amp;gt; 'RMagick'" yourself, **IF** you want to use the supplied 'dragonfly/rails/images' file, which configures it with RMagick.&lt;/p&gt;&lt;p&gt;But if you want to use something else you can register your own custom analyser/processor/encoder in whatever library you want (see the docs at &lt;a href="http://markevans.github.com/dragonfly/" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/"&gt;http://markevans.github.com...&lt;/a&gt; and look at analysis/processing/encoding)&lt;/p&gt;&lt;p&gt;By the way, what's wrong with RMagick? I think it's fantastic! I've heard people talking about memory leaks but never had problems myself.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Thu, 14 Jan 2010 10:13:21 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-29694698</link><description>&lt;p&gt;@cracell - shame you couldn't use it earlier - hopefully it'll help next time!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Wed, 13 Jan 2010 18:17:58 -0000</pubDate></item><item><title>Re: On-the-fly image handling with Dragonfly  @ Bamboo Blog</title><link>http://new-bamboo.co.uk/blog/2010/01/13/dragonfly#comment-29694544</link><description>&lt;p&gt;@Matti - thanks for comment - will check out that link - could be useful to get some ideas!&lt;/p&gt;&lt;p&gt;@Paul - if you look at &lt;a href="http://markevans.github.com/dragonfly/file.ActiveRecord.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.ActiveRecord.html"&gt;http://markevans.github.com...&lt;/a&gt;, you can see some of the stuff you can do with the accessors, and there are a number of ways you could do this kind of thing. You could for example use 'magic attributes' to save the original width and height, so you have the aspect ratio of the original file, then you can work it out for the thumbnail.&lt;br&gt;Or you could save, for example, the result of&lt;br&gt;album.cover_image.transform('200x100').width&lt;br&gt;before saving, but this is expensive.&lt;br&gt;Personally I don't bother using width and height attributes on image tags because I think they never really add much.&lt;/p&gt;&lt;p&gt;@Jason - there's already an S3 storage implementation - see &lt;a href="http://markevans.github.com/dragonfly/file.ExampleUseCases.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.ExampleUseCases.html"&gt;http://markevans.github.com...&lt;/a&gt; and &lt;a href="http://markevans.github.com/dragonfly/Dragonfly/DataStorage/S3DataStore.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/Dragonfly/DataStorage/S3DataStore.html"&gt;http://markevans.github.com...&lt;/a&gt;.&lt;br&gt;As for MongoMapper, I've never used it personally but it's really easy to implement a custom datastore (just three methods) - see &lt;a href="http://markevans.github.com/dragonfly/file.DataStorage.html" rel="nofollow noopener" target="_blank" title="http://markevans.github.com/dragonfly/file.DataStorage.html"&gt;http://markevans.github.com...&lt;/a&gt;. Feel free to create one and send a pull request on github if you want it included.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Wed, 13 Jan 2010 18:15:44 -0000</pubDate></item><item><title>Re: Bamboo Blog - Easy template navigation with partial identifier</title><link>http://new-bamboo.co.uk/blog/2009/08/20/easy-template-navigation-with-partial-identifier#comment-15270062</link><description>&lt;p&gt;Hi Ivar - I just had a quick try with Haml and it almost works as is (but not quite!).&lt;br&gt;Yes I intend to support it when I get the chance - shouldn't be too much work.&lt;br&gt;Hopefully over the next couple of weeks - also feel free to fork it on github if you fancy giving it a go.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Sun, 23 Aug 2009 16:13:32 -0000</pubDate></item><item><title>Re: Bamboo Blog - Block Helpers in Rails Views</title><link>http://new-bamboo.co.uk/blog/2009/08/14/block-helpers#comment-14920320</link><description>&lt;p&gt;Hello mate! Yeh I only recently put the gem up on github.&lt;br&gt;Well I must admit I'm the only one round here not using twitter!&lt;br&gt;I'll probably join the 21st century one day&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Sun, 16 Aug 2009 17:30:43 -0000</pubDate></item><item><title>Re: Bamboo Blog - Block Helpers in Rails Views</title><link>http://new-bamboo.co.uk/blog/2009/08/14/block-helpers#comment-14861250</link><description>&lt;p&gt;Thanks for comments guys - yes peterlih I agree - working with helpers like this means the views are more meaningful - it's not just about being 'clean', it's also that things are in the right place (and in terms of the DRY principle, things which shouldn't be repeated aren't, and things that should be are).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mevans</dc:creator><pubDate>Fri, 14 Aug 2009 20:02:36 -0000</pubDate></item></channel></rss>