Multiple attachments of same or differing types

8 views
Skip to first unread message

MichaelT

unread,
Jun 8, 2009, 1:42:30 PM6/8/09
to Paperclip Plugin
According to the ReadMe, Paperclip can accept multiple attachments.
We've been trying to figure out how that works. When we try to add a
second attachment, it overwrites the first.

None of our searches have given us a good answer. Can you help us?

Kennon Ballou

unread,
Jun 9, 2009, 3:03:18 AM6/9/09
to papercli...@googlegroups.com
Each paperclip attachment has to have a different attachment name.

For instance:

class User
has_attached_file :avatar
has_attached_file :resume
# etc.
end

Then you need the database fields in the users table avatar_file_name,
avatar_content_type, resume_file_name, resume_content_type, etc.

| Kennon Ballou
| Angry Turnip, Inc.

MichaelT

unread,
Jun 9, 2009, 11:10:24 AM6/9/09
to Paperclip Plugin
Thanks, I'll try that. Good info.
Reply all
Reply to author
Forward
0 new messages