Skip to content Skip to sidebar Skip to footer

Comurimagebundle - $(...).fileupload Not A Function

On a previous question i explained that i wanted to store images (at least file name) in a Symfony entity. I followed the answers and installed ComurImageBundle in my project, by

Solution 1:

I saw your comment in the other post and choose to answer you here, If you are using twig forms and blocks so

1/ You have to call the Comur image under "body block" like this

{% block body -%}

{% include "ComurImageBundle:Form:croppable_image_modal.html.twig"with {'include_jquery': false, 'include_bootstrap': false} %}

(your form) ....

{% endblock %}

2/ For Js files calling, you have to call them under "javascript block" , and don't forget the route web call, like this :

{% block javascripts %}

<scriptsrc="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script><scriptsrc="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script><script>var routeweb = "{{ app.request.getSchemeAndHttpHost() }}{{ app.request.getBaseURL() }}";</script>
{% endblock %}

3/ And for to be shure that the image will be uploaded, try to access your form under web directly, means access to

localhost/your_project/web/your_route/new

althought this

localhost/your_project/web/app_dev/your_route/new

Post a Comment for "Comurimagebundle - $(...).fileupload Not A Function"