[英]Can not set image url into anchor tag using ng-file-upload in Angular.js
[英]How to limit to upload mulpltiple files using ng-file-upload in Angular.js
我需要一個幫助。我需要限制使用Angular.js中的ng-file-upload
選擇文件的權限。我在下面解釋我的代碼。
<input
type="file"
class="filestyle form-control"
data-size="lg"
name="bannerimage"
id="bannerimage"
ng-model="file"
ngf-pattern="'image/*'"
accept="image/*"
ngf-max-size="2MB"
ngf-min-height="100"
ngf-resize="{width: 100, height: 100}"
custom-on-change="uploadFile"
required="required"
ngf-select="onFileSelect($file);"
ngf-multiple="true"
>
在這里,我有多個文件選擇方案,但我需要用戶最多只能選擇5個文件,之后它就不能選擇任何文件。請幫助我。
那么ngf-select-disabled屬性呢
使用“ myFiles.length> 5”這樣的條件?
如果用戶可以使用拖放功能,也可以添加ngf-drop-disabled。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.