So I've been working on getting my website to upload multiple files at once, and I've gotten pretty close (I think), but I'm getting the following error "The class 'Symfony\Component\HttpFoundation\File\UploadedFile' was not found in the chain configured namespaces". I think it's because I'm uploading the file as
$data = $form->getData();
$files = $data['file'];
foreach($files as $file)
{
$photo = new Photo();
$photo->setFile($file);
$em->persist($file);
}
instead of connecting $photo to the createFormBuilder, if that makes any sense. I'm not sure what to do here, since I don't want to loose the auto_mapping from doctrine. Is there another workaround here, to make doctrine map UploadedFile? Here's my full code