在 symfony 上使用 FMELfinder 浏览器上传文件类型

Upload file type with FMElfinder browser on symfony

我已经成功地将 FMELfinderBundle 与 IvoryCkeditor 集成。感谢提供者。

现在,我正在寻找上传 <input type="file"> 的文件 来自同一个 elfinder 浏览器,通过 symfony 作为,

$builder->add('file', 'file');

对于这种情况,是否可以从 Elfinder 文件浏览器上传文件?

更新:

我的 elfinder 配置如下所示,

fm_elfinder:
    instances:
        default:
            locale: %locale% # defaults to current request locale
            editor: ckeditor # other options are tinymce, tinymce4, form, custom and simple
            fullscreen: true # defaults true, applies to simple and ckeditor editors
            theme: smoothness # jquery theme
            include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
            connector:
                debug: false # defaults to false
                roots:       # at least one root must be defined
                    uploads:
                        show_hidden: false # defaults to false
                        driver: LocalFileSystem
                        path: uploads
                        upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                        upload_deny: ['all']
                        upload_max_size: 2M
        form:
            locale: %locale% # defaults to current request locale
            editor: form # other choices are tinymce or simple, and form
            fullscreen: true # defaults true, applies to simple and ckeditor editors
            include_assets: true # disable if you want to handle loading of the javascript and css assets yourself
            connector:
                debug: false # defaults to false
                roots:       # at least one root must be defined
                    uploads:
                        driver: LocalFileSystem
                        path: uploads
                        upload_allow: ['image/png', 'image/jpg', 'image/jpeg']
                        upload_deny: ['all']
                        upload_max_size: 2M

在我的 elfinder 表单类型上,

->add('image','elfinder', array('instance'=>'form', 'enable'=>true))

我在输出中得到的只是一个文本字段,点击时没有弹出窗口,这是什么问题?

Bundle 为这种情况提供了自己的表单类型。 Elfinder form type,顺便说一句,输入文件类型的用法,在我看来假设您将通过自己的控制器处理文件上传过程