vue-dropzone
vue-dropzone copied to clipboard
How can i prevent default upload
I have a project in which i want to use this package for multiple file upload.
I have a api which uploads multiple files using files array. So i want to use it & set state of files to uploaded/success after upload using my api.
I can get queued files & use it for upload but i don't know how to set state of added files to uploaded.
Can anyone help me with this?
In short i don't want to use url to upload file. I want to use manual method to upload files.
i wanna do the same, any solution ?
same
Take a look at the dropzone.js options - of interest is the autoProcessQueue option, which you then need to follow with a call to .processQueue()
Something like
<vue-dropzone :options="dropzoneOptions"></vue-dropzone>
....
dropzoneOptions: {
url: '....',
autoProcessQueue: false
}
....
methods: {
someMethod: {
this.$refs.myVueDropzone.processQueue()
}
}
It seems that even with autoProcessQueue: false set, the dropzone tries to upload the files straight away when added. I have a dummy URL and each time I add a file, the following events happen:
file-addederrorremove-file
Interestingly, the file doesn't actually seem to be removed (which I check with dropzone.getAcceptedFiles()) but the event is still fired. Is this expected behaviour?