VichUploaderBundle with symfony 4: no extension able to load the configuration for "mappings"

I’m trying to use VichUploaderBundle to handle a file upload. I work with symfony 4.
I have a problem in the first step (Step 1: configure an upload mapping).

in the app/config/config.yml file I have:

    db_driver: orm

        uri_prefix: /images/properties
        upload_destination: '%kernel.project_dir%/public/images/properties'

But it creates an error:

(2/2) FileLoaderLoadException
There is no extension able to load the configuration for "mappings" (in C:wamp64wwwMonAgenceconfig/packages/vich_uploader.yaml). 
Looked for namespace "mappings", found "framework", "sensio_framework_extra", "doctrine_cache", "doctrine", "doctrine_migrations", "security", "swiftmailer", "web_profiler", "twig", "monolog", "debug", "maker", "web_server", "doctrine_fixtures", "knp_paginator", "vich_uploader" 
in C:wamp64wwwMonAgenceconfig/packages/vich_uploader.yaml (which is loaded in resource "C:wamp64wwwMonAgenceconfig/packages/vich_uploader.yaml").

I searched the internet but I don’t see how to fix it.
Do you have an idea?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *