wbsurfver-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
2006-Dec-05 11:51 UTC
can you have multiple uploads on a page using acts_as_attachment ?
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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
mixplate
2006-Dec-05 14:43 UTC
Re: can you have multiple uploads on a page using acts_as_at
i believe you can just create a new object for each upload. basically have multiple upload fields on one form. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ahmad A.
2006-Dec-14 08:17 UTC
Re: can you have multiple uploads on a page using acts_as_attachment ?
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 %>
<div id="extraAttachment"></div>
----------------------------
controller file:
def extraAttachment
render(:layout => false)
end
----------------------------
partial file:
<% index = Time.now.tv_sec %>
<input id="attachment_data"
name="attachment[<%=index%>][data]" size="30"
type="file" />
----------------------------
I use the Time function to produce a unique hash key each file input added
to the form.
hope this helps
On 12/5/06, wbsurfver-/E1597aS9LQAvxtiuMwx3w@public.gmane.org
<wbsurfver-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>
wrote:>
>
>
> 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.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---