Reputation: 1937
I have a wierd problem. I can't add file type into form like so:
$builder->add('file', 'file', array('mapped' => 'false'));
It's throwing an error:
Could not load type "file"
500 Internal Server Error - InvalidArgumentException
Any thoughts what's causing that?
Upvotes: 1
Views: 374
Reputation: 417
If you generate your form based on the entity class, please make sure that 'file' is exist as
protected $file;
in your entity class.
Upvotes: 1