Hi Arve,

I'm a bit confused about your models and relationships. If you want to
have several attachments to a project, then you are gonna need a 1-N
relationship:

  A project has many projectfiles
  A projectfile belongs to one project

Maybe I got the idea wrong, but you are trying to create a multiple
file upload in the edit page of a projectfile. I think it would make
more sense to do it in the edit page of the project. Or maybe I didn't
understand your relationships :P.

By the way, there's a working example of multiple file upload (you can
drag 3 attachments in the show of a project) in here:
https://github.com/suyccom/sgagility . I'm afraid I haven't taken much
care of that app (I plan to replace it soon with a cleaner one), and
some parts might be broken, but it might serve as an example.

Regards,
Ignacio

El 24/10/12 00:22, Arve Voldsund escribió:
> I struggle a bit with a create method for a model with multiple
> file upload, and could really need some advice on this.
> 
> Basically I want the user to create a new projectfile (that's the
> model name) and assign it to a project. This is trivial.
> 
> Then, in the edit-page for that particular projectfile there is a
> file upload using the jQuery file upload plugin which allows
> multiple files. Files upload just fine, but only one file will be
> assigned to the projectfile in the database. I understand why, but
> I do not quite get how to fix it in the create method.
> 
> 
> Arve
> 
> 
> -- You received this message because you are subscribed to the
> Google Groups "Hobo Users" group. To view this discussion on the
> web visit 
> https://groups.google.com/d/msg/hobousers/-/9skhe0yG4hUJ. To post
> to this group, send email to [email protected]. To
> unsubscribe from this group, send email to 
> [email protected]. For more options, visit
> this group at http://groups.google.com/group/hobousers?hl=en.

-- 
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to