A Vue directive that allows you to input multiple files.
npm i v-addable-files --save
<input type="file" v-addable-files="files" multiple>
new Vue({
el: '#app',
data: {
files: []
}
})
<input type="file" v-addable-files="files" max="5" @too-many="onError" multiple>
new Vue({
el: '#app',
data: {
files: []
},
methods: {
onError: function(e) {
console.log('Too many!', e.detail)
}
}
})
This package is licensed under the MIT License.
Copyright 2018 Sukohi Kuhoh