2

我正在尝试配置 OneupUploaderBundle。根据 github中的文档,给定的配置是:

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

对于此配置,我收到此错误:

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.

我试图通过添加这个配置(如github中提到的)来解决这个问题,如下所示:

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

得到的错误是:

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

所以,我想知道我在这个捆绑包的配置中错过了什么。

供您参考,我在 symfony 项目中安装的版本是:

"oneup/uploader-bundle": "1.3.1"

感谢您的帮助。

4

1 回答 1

2

文档指出以下内容:

要启用动态路由,请将以下内容添加到您的路由配置文件中。

#  app/config/routing.yml

oneup_uploader:
    resource: .
    type: uploader

放置它的正确位置不是config.yml文件,而是routing.yml文件。

于 2014-10-17T08:42:30.980 回答