0

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

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

$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))

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

4

1 回答 1

2

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

于 2015-04-09T17:02:47.243 回答