V-labs / VlabsMediaBundle

Form, database and filesystem abstraction for files
44 stars 18 forks source link

OneToMany association #5

Closed grobx closed 11 years ago

grobx commented 11 years ago

Hi. I would like to know if this bundle is suitable for OneToMany associations.

choomz commented 11 years ago

Hi,

Can you share your mapping ?

I don't use it with OneToMany, but I have some projects wich are using ManyToMany associations and it's working, so it shouldbe ok ..

grobx commented 11 years ago

Sure, ill do. Do you use it with SonataAdminBundle ?

grobx commented 11 years ago

Here you can find a live non-working example :) If you need more info, please tell me.

choomz commented 11 years ago

Here is a not tested exemple : https://gist.github.com/choomz/4948099 but the mapping is correct.

I am not using Sonata's bundles. But i think there is a media bundle too if you want to use it with sonata admin.

anyt commented 11 years ago

Hi! What FormType element do you use for multiple images upload with this bundle?

 $builder->add('images', 'vlabs_file', array(
                'required' => false
            );

This code isn't working for me. And can I use http://blueimp.github.io/jQuery-File-Upload/ with this bundle?

choomz commented 11 years ago

Hi,

Actually, one input field = one file. The bundle is not working with ajax uploading and so, not working with multiple files upload with one field. It's in TODO :)

Note that you can have multiple fields in same form.