Symfony 3.1 and OneUpUploaderBundle + FineUploader = UploadListener is not called

与世无争的帅哥 提交于 2019-11-29 16:57:19

The problem in question was caused by misconfiguration of event listeners in services.yml. Here is working configuration.

my services.yml

services:
    app.upload_listener:
        class: AppBundle\EventListener\UploadListener
        arguments: ["@doctrine.orm.entity_manager"]
        tags:
            - { name: kernel.event_listener, event: oneup_uploader.post_persist.gallery, method: onPostUpload }
            - { name: kernel.event_listener, event: oneup_uploader.post_persist.gallery, method: onUpload }

    app.upload_unique_namer:
        class: AppBundle\Uploader\Naming\UploadUniqueNamer
        arguments: ["@session"]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!