javascript - Only allow specific file extensions in angular-file-upload module to be clickable -
i'm using module, https://github.com/nervgh/angular-file-upload
i using simple example, http://nervgh.github.io/pages/angular-file-upload/examples/simple/
when click "choose file" button, open window allows pick file want upload. happen allow specific file extensions clicked. there non-documented configuration that?
for example, in config, allowed .txt extensions, when click "choose file" button, open window , show files. however, files doesn't have extension .txt disabled.
i'm not doing security purposes. following design/instructions provided me. :) can use mitm tools intercept , allow other extensions uploaded.
you can achieve goal doing this
accept=".txt"
<input ui-jq="filestyle" type="file" nv-file-select="" accept=".txt" uploader="uploader" data-icon="false" data-classbutton="btn btn-default" data-classinput="form-control inline v-middle input-s" multiple>
Comments
Post a Comment