I tried to install VichUploaderBundle with Gaufrette but i had error:
The specified path (gaufrette://users_avatars_fs) is invalid.
composer.json
"require": {
...
"vich/uploader-bundle": "dev-master",
"knplabs/gaufrette": "0.2.*@dev",
"knplabs/knp-gaufrette-bundle": "dev-master",
"amazonwebservices/aws-sdk-for-php": "dev-master"
},
appKernel.php
$bundles = array(
..
new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
);
config.yml
knp_gaufrette:
stream_wrapper: ~ #<<<<----- Without this i had error that i pasted below
adapters:
users_avatars_adapter:
local:
directory: %kernel.root_dir%/../web/images/avatars
create: true
filesystems:
users_avatars_fs:
adapter: users_avatars_adapter
vich_uploader:
db_driver: orm
gaufrette: true
storage: vich_uploader.storage.gaufrette
mappings:
users_avatars:
uri_prefix: /images/avatars
upload_destination: users_avatars_fs
Error
Warning: is_file(): Unable to find the wrapper "gaufrette" - did you forget to enable it when you configured PHP? in /home/adam/public_html/project/vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php line 98
I will be grateful for help.