Allow uploading images (#13)
Adds an optional field for the post image. Fixes #12 Co-authored-by: clfreville2 <clement.freville2@etu.uca.fr> Reviewed-on: https://codefirst.iut.uca.fr/git/clement.freville2/herbarium/pulls/13 Reviewed-by: Bastien OLLIER <bastien.ollier@noreply.codefirst.iut.uca.fr>
This commit is contained in:
11
config/packages/vich_uploader.yaml
Normal file
11
config/packages/vich_uploader.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
vich_uploader:
|
||||
db_driver: orm
|
||||
|
||||
metadata:
|
||||
type: attribute
|
||||
|
||||
mappings:
|
||||
posts:
|
||||
uri_prefix: /images/posts
|
||||
upload_destination: '%kernel.project_dir%/public/images/posts'
|
||||
namer: Vich\UploaderBundle\Naming\SmartUniqueNamer
|
Reference in New Issue
Block a user