我在我的应用中使用ng-flow,有没有办法限制上传的文件数量?
代码示例:
<div class="thumbnail" ng-show="$flow.files.length">
<img flow-img="$flow.files[0]" />
</div>
<div>
<a href="#" class="btn" ng-hide="$flow.files.length" flow-btn flow-attrs="{accept:'image/*'}">Select image</a>
<a href="#" class="btn" ng-show="$flow.files.length" flow-btn flow-attrs="{accept:'image/*'}">Change</a>
<a href="#" class="btn btn-danger" ng-show="$flow.files.length"
ng-click="$flow.cancel()">
Remove
</a>
</div>发布于 2015-09-04 00:17:20
flow-file-added属性需要一个布尔值。你可以把你所有的条件都放进去。$flow.files.length返回已添加的文件数a
例如:
<div flow-init flow-files-submitted="$flow.upload()" flow-file-added="$flow.files.length<3"></div>https://stackoverflow.com/questions/28373906
复制相似问题