0

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

出力に表示されるのは、クリックしてもポップアップが表示されない単なるテキスト フィールドです。何が問題なのですか?

4

1 に答える 1

2

Bundle は、この場合に独自のフォーム タイプを提供します。 Elfinder form type、入力ファイル タイプのところでの使用法、私の意見では、ファイルのアップロード プロセスを独自のコントローラーで処理することを前提としています

于 2015-04-09T17:02:47.243 に答える