diff --git a/controller/upload_file.rst b/controller/upload_file.rst index 31d17940038..372330cc60c 100644 --- a/controller/upload_file.rst +++ b/controller/upload_file.rst @@ -319,7 +319,7 @@ Now you're ready to use this service in the controller:: if ($form->isSubmitted() && $form->isValid()) { /** @var UploadedFile $brochureFile */ - $brochureFile = $form['brochure']->getData(); + $brochureFile = $form->get('brochure')->getData(); if ($brochureFile) { $brochureFileName = $fileUploader->upload($brochureFile); $product->setBrochureFilename($brochureFileName);