Skip to content

Commit 4629d9c

Browse files
committed
minor #20043 Fix the parameter configuration in the file upload doc (javiereguiluz)
This PR was merged into the 5.4 branch. Discussion ---------- Fix the parameter configuration in the file upload doc Fixes #20039. I propose to do this change in 5.4 ... but revert this and use `#[Autowire('%kernel.project_dir%/public/uploads/brochures')]` instead in 6.4 branch and up. Commits ------- 86e415b Fix the parameter configuration in the file upload doc
2 parents 8b4b586 + 86e415b commit 4629d9c

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

controller/upload_file.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,16 +175,17 @@ Finally, you need to update the code of the controller that handles the form::
175175
}
176176
}
177177

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

181181
.. code-block:: yaml
182182
183183
# config/services.yaml
184-
185-
# ...
186-
parameters:
187-
brochures_directory: '%kernel.project_dir%/public/uploads/brochures'
184+
services:
185+
_defaults:
186+
# ...
187+
bind:
188+
$brochuresDirectory: '%kernel.project_dir%/public/uploads/brochures'
188189
189190
There are some important things to consider in the code of the above controller:
190191

0 commit comments

Comments
 (0)