如何配置OneupUploaderBundle



我正在尝试配置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"

谢谢你的帮助。

文档说明如下:

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

#  app/config/routing.yml
oneup_uploader:
    resource: .
    type: uploader

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

相关内容

  • 没有找到相关文章