
Mike Clark has put together a stunningly simple tutorial covering how to create a complete file uploading and image resizing system in mere minutes using Rick Olson's attachment_fu plugin. What impresses me the most is that he shows how attachment_fu can automatically store uploaded files on Amazon's S3 service with only a few tweaks. This is a must read for Rails developers who haven't brushed up on their file upload techniques lately.

Comments
Isaac ·
I posted a quick response to Mike's tutorial here:
http://isaac.org.nz/2007/2/25/image-processing-with-attachment_fu
It outlines why I ended up going with mini_magick as an image processor.
Jeff Coleman ·
One thing Mike didn't mention is that there seem to be issues using attachment_fu with Windows:
http://railsweenie.com/forums/3/topics/1257
It seems to have trouble saving the correct size of the files. Acts_as_attachment seems to work correctly, but something's up in attachment_fu.
Wes Ratcliff ·
I'll second the problem on Windows... haven't found a fix yet.
Jon Maddox ·
Ahh, this is very nice indeed. Little has been documented about this plugin. Rick hadn't even written much in the README yet.
This rocks.
Jeff de Vries ·
Neat! I added photo upload to our site using these instructions (modified for our models) in under an hour, and it worked the first time!
Don ·
All of the file upload examples that I've found seem to be geared toward image uploads. How well does something like attachment_fu work for non-image uploads? Is there something better for handling arbitrary file types?
Peter Cooper ·
Should be fine, Don. Most upload plugins are for arbitrary files, it's just that because image uploads are so popular.. they provide short cuts and useful methods for that.
Don ·
If I set attachment_fu to store uploaded files in the file system, it puts them in the 'public' directory of the Rails app. I can specify a path for uploads, but it's relative to 'public'. My app is going to be deployed on a multi-user system, so I need to store files in a path relative to ~username. Is there a plug-in that allows that?