Closed thechoiceone closed 10 years ago
@thechoiceone you are missing a "/" at the beginning of uri_prefix
, it should be:
vich_uploader:
db_driver: orm
mappings:
upload_image:
uri_prefix: /upload/images #se the slash at the beginning
upload_destination: %kernel.root_dir%/../web/upload/images
namer: vich_uploader.namer_uniqid
inject_on_load: true
same problem with "/" now in my config: vich_uploader: db_driver: orm mappings: upload_image: uri_prefix: /upload/images/ upload_destination: %kernel.root_dir%/../web/upload/images namer: vich_uploader.namer_uniqid inject_on_load: true and this is the result
i cheek the .htaccess and disabled it but nothing happend, same result
@thechoiceone
Try removing the final slash in uri_prefix
.
vich_uploader:
db_driver: orm
mappings:
upload_image:
uri_prefix: /upload/images #no slash at the end
upload_destination: %kernel.root_dir%/../web/upload/images
namer: vich_uploader.namer_uniqid
inject_on_load: true
Edit: The second error is not the same than the first, the second error is very different, maybe you manually changed the name field in the database for an absolute path?
OMG you dont know of many combinatios i have tried but this just work
I really thank you for helping
I have a problem whit CollectionUpload, i test the demo sescandell https://github.com/sescandell/CollectionUploadSample and almost all work, I have a parent class called "demanda" who have a sub class called library which work fine when i create a new element, i mean in upload and show preview it working, the problems comes when i edit a object whit a library it dont leet me download the file uploaded (the file is in the server, i can see it if i look into the upload folder ) and dont show the thumbnail the download buton shows the complete rute like "admin/demanda/1/edit/upload/image/img.jpg" instead of "upload/image/img.jpg" my config.yml says vich_uploader: db_driver: orm mappings: upload_image: uri_prefix: upload/images upload_destination: %kernel.root_dir%/../web/upload/images namer: vich_uploader.namer_uniqid inject_on_load: true
i chek all admingenerated code looking for a clue but i don find nothing, so i dont know if is a routing problem or a config problem and i am very lost at this point, if you need some file just ask and i post it here
thanks for your help