Symfony 7 Fundamentals: Services, Config & Environments
Parameters
Start your All-Access Pass to unlock this challenge
Buy Access Login

Challenge 1 / 1

You have an ImageUploader service. And you need to inject a correct path where to store the images. Your boss said the images should be stored in the public/media/uploads/ folder according to the project root directory, and you need to inject the full path to that dir as the 1st argument of that service. The bin/console debug:container --parameters output is:

 Symfony Container Parameters
 ============================

 --------------------------------
  Parameter                Value
 --------------------------------
  fragment.path            /_fragment
  image_uploads_dir        media/uploads
  kernel.logs_dir          /Users/sfcasts/www/starshop/var/log
  kernel.project_dir       /Users/sfcasts/www/starshop
  kernel.secret            %env(APP_SECRET)%

How can you inject that path into the service?

Select your answer
Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.