我已经在表单中创建了图像upload file文本字段。如果用户需要多选择字段。我想赋予用户选择文件数量的权利。
让我给你看我的文本字段。
<div class="form-group col-lg-10">
{!! Form::label('file', 'Upload Chart:') !!}
{!! Form::file('file', null,['class'=>'form-control'])!!}
</div>
发布于 2018-06-16 09:41:01
在html5中,您可以简单地添加multiple属性以支持多个文件上载。
<input type="file" name="field_name_for_files" multiple>
我不知道您正在使用的Form助手,但是它应该在第三个参数数组中接受'multiple' => 'multiple'。
试试这个:
<div class="form-group col-lg-10"> {!! Form::label('file', 'Upload Chart:') !!} {!! Form::file('file', null,['class'=>'form-control', 'multiple' => 'multiple'])!!} </div>
希望这能有所帮助。
https://stackoverflow.com/questions/50886392
复制相似问题