如何以编程方式为文件上载控件分配文件

时间:2018-01-05 12:10:25

标签: angularjs file-upload bootstrap-4

我想手动为文件上传控件分配一个文件,是否可以将文件分配给文件上传控件,我怎样才能在angularjs中进行。

 <div class="fileinput fileinput-new" data-provides="fileinput">
    <span class="fileinput-filename"></span>
    <a href="#" class="close fileinput-exists" data-dismiss="fileinput"
       style="float: none" hidden>&times;</a>
    <span class="btn btn-blue btn-sm btn-file" style="background: #e6e9ee">
      <span class="fileinput-new">Select file</span>
      <span class="fileinput-exists">Change</span>
      <input type="file" id="importBtn" accept="application/vnd.ms-excel,.xlsx,.xls" 
             facultylistfile-model="empFile" name="...">
   <a href="#" class="btn btn-sm btn-danger fileinput-exists"
      data-dismiss="fileinput">Remove</a>
 </div>

0 个答案:

没有答案