I am using SonataAdminBundle (with Doctrine2 ORM) and I have successfully added a file upload feature to my Picture model.
I would like, on the
You can easily do this on show page
by template attribute pass on $showmapper
->add('picture', NULL, array(
'template' => 'MyProjectBundle:Project:mytemplate.html.twig'
);
and inside your template you get current object so u can call get method and pull image path
{% block name %}{{ admin.trans(field_description.label) }}{% endblock %}
{% block field %}{{ value|nl2br }}{% endblock %}
To show image in edit mode you have to override fileType
or you have to create your own customType on top of fileType
There is also some bundle which is having this kind of functionality check out this GenemuFormBundle