Skip to content

Commit

Permalink
minor #5766 Fixed two typos (ThomasLandauer)
Browse files Browse the repository at this point in the history
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #5766).

Discussion
----------

Fixed two typos

Commits
-------

4d4e72c Fixed two typos
  • Loading branch information
xabbuh committed Oct 7, 2015
2 parents 1462b8a + 4d4e72c commit edff52f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/controller/upload_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ in the ``Product`` entity::
Note that the type of the ``brochure`` column is ``string`` instead of ``binary``
or ``blob`` because it just stores the PDF file name instead of the file contents.

Then, add a new ``brochure`` field to the form that manage the ``Product`` entity::
Then, add a new ``brochure`` field to the form that manages the ``Product`` entity::

// src/AppBundle/Form/ProductType.php
namespace AppBundle\Form;
Expand Down Expand Up @@ -133,7 +133,7 @@ Finally, you need to update the code of the controller that handles the form::

// Update the 'brochure' property to store the PDF file name
// instead of its contents
$product->setBrochure($filename);
$product->setBrochure($fileName);

// ... persist the $product variable or any other work

Expand Down

0 comments on commit edff52f

Please sign in to comment.