Skip to content

Fixed two typos #5766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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