Amine Jallouli
Amine Jallouli

Reputation: 3959

how to config the OneupUploaderBundle?

I am trying to config the OneupUploaderBundle. According to the documentations in github, the given config is:

oneup_uploader:
    mappings:
        gallery:
            frontend: blueimp # or any uploader you use in the frontend

For this config, I got this error:

Twig_Error_Runtime: An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "_uploader_upload_gallery" as such route does not exist.") in "MinnAdsBundle:Motors:oneup.html.twig" at line 25.

I tried to solve this issue by adding this config (as mentionned in github) to become like this:

oneup_uploader:
    mappings:
        gallery:
            frontend: blueimp # or any uploader you use in the frontend  
    resource: .
    type: uploader 

The obtaind error is:

InvalidConfigurationException: Unrecognized options "resource, type" under "oneup_uploader"

So, I am wondering what I have missed in the config of this bundle.

For your information, The version I installed in my symfony project is:

"oneup/uploader-bundle": "1.3.1"

Thank for your help.

Upvotes: 2

Views: 1628

Answers (1)

devsheeep
devsheeep

Reputation: 2116

The documentation states the following:

To enable the dynamic routes, add the following to your routing configuration file.

#  app/config/routing.yml

oneup_uploader:
    resource: .
    type: uploader

The correct place to put this is not the config.yml file but the routing.yml file instead.

Upvotes: 2

Related Questions