IphpFileStoreBundle icon indicating copy to clipboard operation
IphpFileStoreBundle copied to clipboard

Multiple upload

Open cve opened this issue 11 years ago • 1 comments

Hi.

Is it possible to handle multiple file upload in that easy way?

cve avatar Dec 05 '13 18:12 cve

May be it helps you if you want to have as multiple upload so multiple created fields

foreach ($form->getData()->getPhoto() as $index => $photo) {
    $photoItem = new Photo();
    $photoItem->setPhoto($photo);
    $em->persist($photoItem);
}
$em->flush();

And only mark photo field in Form Builder as multiple

...
 ->add ('photo', 'file', array(
     'multiple' => 'multiple'
 ));
....

morozow avatar Oct 07 '14 12:10 morozow