Open rpostolov opened 10 years ago
Hi, I working on windows now and have the same issue. Because of path separators "\" after using "parse_url" array parameter $parts['host'] takes both host an path parts. As a result $key variable becomes empty and you getting this error.
f.e.:
$path = "gaufrette://ckeditor_fs\545b52d0f2300_Hydrangeas.jpg";
$parts = parse_url($path);
# On windows $parts variable takes following result.
# array(5) {
# ["scheme"] => string(9) "gaufrette"
# ["host"] => string(40) "ckeditor_fs\545b52d0f2300_Hydrangeas.jpg"
# ["path"] => NULL
# ["query"] => NULL
# ["fragment"] => NULL
# }
Hi,
I'm on Symfony 2.3, i use knp_gaufrette bundle with vich_uploader bundle with admingenerator bundle. When i create a new object and i upload an image all works perfectly, my image is uploaded, my data base is updated with the name of image but when i want to edit (not update) this object i have this issue insteade of the form :
The specified path (gaufrette://drapeau_image_fs\53d8d34ee6d0e.jpg) is invalid.
Someone for help i search everywhere nad i found no solutions...
Here is my config :
PaysAdmin-generator.yml ... drapeauFile: label: Flag formType: afe_single_upload dbType: string addFormOptions: nameable: drapeau data_class: Symfony\Component\HttpFoundation\File\File previewImages: true previewAsCanvas: true previewFilter: drapeau200w200h ...
app/config.yml
knp_gaufrette: stream_wrapper: ~ adapters: drapeau_adapter: local: directory: %kernel.root_dir%/../web/images/drapeau
vich_uploader: db_driver: orm gaufrette: true twig: true storage: vich_uploader.storage.gaufrette