Can you have multiple uploads on a page using acts_as_attach

I have seen some examples using acts_as_attachment, and what I have
seen only has one upload on a page. including here I believe.

http://weblog.techno-weenie.net/articles/acts_as_attachment

Since the functionality here seems very specific and complex behind
the scenes, I am concerned that it will be hard to get it to work with
multiple uploads on one page. Now that I think about it, maybe you’d
have to have a partial rendering for each upload. At any rate I am new
to this acts_as_attachment methodology and do not really have allot of
time to get something to work with it on a project I am doing, so I
thought I should post the question on here, though I have also been
trying to google some more on this.

i believe you can just create a new object for each upload. basically
have multiple upload fields on one form.

I’m not using acts_as_attachment, but I have a form with support for
unlimited file uploads


view file:

<%= link_to_remote “Add Attachment”, :url => { :action =>
“extraAttachment”
},
:update => “extraAttachment”,
:position => :top %>

controller file:

def extraAttachment
render(:layout => false)
end


partial file:

<% index = Time.now.tv_sec %>


I use the Time function to produce a unique hash key each file input
added
to the form.

hope this helps