my controller receives post data. It\'s not from a Symfony generated form, but from an AngularJS custom form using FormData
.
The normal parameters are r
The Request has a FileBag, similar to the ParameterBag
So I could get the file specified easily with:
$data = $this->getRequest()->request->all();
$file = $this->getRequest()->files->get('file');
and use the document as is from the cookbook:
$document = new Document();
$document->setFile($file);
$lead->setDocument($document);