这是indexloc提供的服务,不要输入任何密码
Skip to content

file_widget errors out in a collection #279

@ghost

Description

bootstrap.twig.html:159

<input type="file" {{ block('widget_attributes') }} {% if value is not empty %}value="{{ value }}" {% endif %}>

should be something like

<input type="file" {{ block('widget_attributes') }}>

value is the file object.

simple example:

  $builder->add('imgs', 'collection', array(
        'type' => new FileType(),
        'data' => [
            new File(),
            new File(),
        ]
    ));

An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Object of class File could not be converted to string in.. 159 etc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions