views:

1095

answers:

5

Lets say I have a model called Recipe. Each Recipe has several photos, a PDF file and a video. Is there a plugin out there that lets me have something as simple as Recipe.photos, Recipe.photos.first.filename, Recipe.pdf.filename, Recipe.video.filesize and so on?

A: 

acts_as_attachment??!!!! it's tool old. nobody use it these days. Use Paperclip from the cool guys at thoughtbots.

Allen Bargi
should've been a comment, not an answer
Ryan Bigg
+3  A: 

Not sure if this helps, but check out Paperclip, a Rails + ActiveRecord plugin.

Abi Noda
A: 

Paperclip is the attachment tool to use. As for mulitple uploads that is tricker. You will either need to use SWFUpload (name?) the flash front end for multiple upload, or you will need to roll your own system.

On a project I had an app that was all about photos so I wrote an uploader/unzipper that you would upload a zip of photos to and system would unzip them and insert them into the system for the admin users.

Good Luck.

railsninja
A: 

I am using restful_authentication + attachment_fu + SWFUpload, which handles multiple attachments VERY well IMO.

Here's your quick start guide: http://github.com/davidsouth/rails-swfupload/tree/master

Sai Emrys
A: 

Paperclip is supposed to handle multiple files, although I have tried that aspect of it yet. Uploading multiple images with Rails and Paperclip seems to explain how to do it... also ... Uploading multiple images with paperclip ...

sbwoodside