-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Hi,
I spent time reading the doc and looking at the sandbox and right now I found how to link my document to an image with a 'cmf_media_image' form type but nothing for simple file.
When I try to use a file form type i have this error :
*
The form's view data is expected to be an instance of class Symfony\Component\HttpFoundation\File\File, but is an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class PHPCRProxies__CG__\Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File to an instance of Symfony\Component\HttpFoundation\File\File.
*
I need this to have a downloadable pdf file and a video.
I don't understand why there is no 'cmf_media_file' form type ?
And is there a way to limit to a list of file extension ?
Thanks a lot
Nico