Skip to content

Fix the parameter configuration in the file upload doc #20043

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

Merged
merged 1 commit into from
Jul 17, 2024
Merged
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
13 changes: 7 additions & 6 deletions controller/upload_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,17 @@ Finally, you need to update the code of the controller that handles the form::
}
}

Now, create the ``brochures_directory`` parameter that was used in the
controller to specify the directory in which the brochures should be stored:
Now, bind the ``$brochuresDirectory`` controller argument to its actual value
using the service configuration:

.. code-block:: yaml

# config/services.yaml

# ...
parameters:
brochures_directory: '%kernel.project_dir%/public/uploads/brochures'
services:
_defaults:
# ...
bind:
$brochuresDirectory: '%kernel.project_dir%/public/uploads/brochures'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$brochuresDirectory: '%kernel.project_dir%/public/uploads/brochures'
string $brochuresDirectory: '%kernel.project_dir%/public/uploads/brochures'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done while merging. Thanks!


There are some important things to consider in the code of the above controller:

Expand Down
Loading