rowanwins / vue-dropzone

A Vue.js component for Dropzone.js - a drag’n’drop file uploads utility with image previews
https://rowanwins.github.io/vue-dropzone/docs/dist
MIT License
2.02k stars 1.4k forks source link

How to manually enqueue a file #563

Open stefanknegt opened 4 years ago

stefanknegt commented 4 years ago

In the documentation of Dropzone.js it says you can add files to the queue with enqueueFile(file). However, when I do the following: this.$refs.myVueDropzone.enqueueFile(file) I get the following error: this.$refs.myVueDropzone.enqueueFile is not a function. I already checked and enqueueFile is indeed not listed as a function, nor is there anything similar. How can I manually add a file to the queue?

victoreassis commented 4 years ago

You could get the dropzone instance on vue-dropzone and call the method directly as:

this.$refs.myVueDropzone.dropzone.enqueueFile(file)