I am working on a Rails app that involves my users uploading used
items for sale. When they upload an item, they will also be uploading
a photo of that item (in the future, possibly multiple images).
So, the image will obviously be associated with the item listing and
the user listing it. Currently, I am thinking of storing the images on
the server in the file system, but not totally sold on that option.
Maybe you guys could also recommend an appropriate storage method.
Which plugin would you guys recommend to handle this, Paperclip or
Attachment_fu? What are the main differences between the two and which
is easier to setup and use for my case?
Paperclip is simpler to setup and it does what you're looking for, but
AttachmentFu has more features, like selecting which image processing
tool and storage medium (you can even store files in a Amazon S3
bucket), so, if you're planning on expansion, AttachmentFu might be a
better option, if you're just looking for a simple tool what works,
Paperclip may be better.
Yeah, my main concern is expansion for later. I think I potentially
have a project that could get rather large with many users and likely
1,000's of items listed. Attachment_Fu seems like the way to go, but I
found out about Paperclip yesterday and it seems really nice.
But, like you said, having those extra options may benefit me more in
the long run.
I've used both on separate projects and agree with Mauricio that
Paperclip is easier to use but it is really only for use where you
have a model (e.g. Person), who has an attribute of photo. If you
want the Person to have multiple photos, you would need to use
attachment_fu and if you want the photo to have its own attributes
(e.g. title, location), attachment_fu would be the way to go.
disclaimer: i’ve never used attachment_fu but frequently hear people having problems with configuring it. something i don’t really hear with paperclip. [seriously (joking)… if you can’t get paperclip working… you probably can’t get rails up either.]
I have used both extensively. You can just as easily have a separate model for the purpose of having
multiple photos with paperclip, as you can with attachment_fu. One key advantage of paperclip over attachment_fu when you have many images is that paperclip only needs one record for the image and all its thumbnails, whereas attachment_fu uses a database record for each thumbnail as well. When you are dealing with hundreds of thousands of images, this decreased database usage can become significant.