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);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…