From ca379711e23fa54bdb30cbfd785fd38f93c2921c Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Sun, 5 Jan 2025 05:54:51 +0000 Subject: [PATCH] add vich_uploader config --- config/packages/vich_uploader.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 config/packages/vich_uploader.yaml diff --git a/config/packages/vich_uploader.yaml b/config/packages/vich_uploader.yaml new file mode 100644 index 0000000..5d9ca5c --- /dev/null +++ b/config/packages/vich_uploader.yaml @@ -0,0 +1,20 @@ +vich_uploader: + db_driver: orm + metadata: + auto_detection: true + cache: file + type: attribute + mappings: + imageName: + uri_prefix: "%app.path.imageName%" + upload_destination: "%kernel.project_dir%/public/upload/user/profiles" + namer: Vich\UploaderBundle\Naming\SmartUniqueNamer + inject_on_load: false + delete_on_update: true + delete_on_remove: true + + #mappings: + # products: + # uri_prefix: /images/products + # upload_destination: '%kernel.project_dir%/public/images/products' + # namer: Vich\UploaderBundle\Naming\SmartUniqueNamer