使用symfony上的FMElfinder浏览器上传文件类型



我已成功地将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))

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

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

相关内容

  • 没有找到相关文章

最新更新