Skip to content
Snippets Groups Projects
Commit 8e560676 authored by HJ's avatar HJ :fire:
Browse files

allow multiple file upload

parent 68d15f66
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,10 @@ const mediaUpload = {
const input = this.$el.querySelector('input')
input.addEventListener('change', ({target}) => {
const file = target.files[0]
this.uploadFile(file)
for (var i = 0; i < target.files.length; i++) {
let file = target.files[i]
this.uploadFile(file)
}
})
},
data () {
......
......@@ -3,7 +3,7 @@
<label class="btn btn-default">
<i class="icon-spin4 animate-spin" v-if="uploading"></i>
<i class="icon-upload" v-if="!uploading"></i>
<input type=file style="position: fixed; top: -100em"></input>
<input type="file" style="position: fixed; top: -100em" multiple="true"></input>
</label>
</div>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment