foolicious
foolicious

Reputation:

What is the best plugin to handle multiple file uploads in Rails?

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?

Upvotes: 4

Views: 1844

Answers (4)

Simon Woodside
Simon Woodside

Reputation: 7314

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 ...

Upvotes: 1

Sai
Sai

Reputation: 7229

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

Upvotes: 0

nitecoder
nitecoder

Reputation: 5486

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.

Upvotes: 0

GeekJock
GeekJock

Reputation: 11346

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

Upvotes: 4

Related Questions