G
G
gitdev2018-11-05 17:47:52
symfony
gitdev, 2018-11-05 17:47:52

How to upload images in EasyAdmin?

All uploaded images end up in the folder: /temp/filename
You must specify the path for the uploaded file.
In the config for EasyAdmin I specify:

easy_admin:
    entities:
        About:
            class: App\Metrag\AppBundle\Entity\About
            list:
                fields:
                    - description
                    - { property: 'img', type: 'image', label: 'Image' }
            form:
                fields:
                    - description
                    - { property: 'img', type: 'file', label: 'Image111', type_options: {data_class: null} }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question