How to get file upload without a form

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);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)