vue-dropzone icon indicating copy to clipboard operation
vue-dropzone copied to clipboard

How can i prevent default upload

Open akvaliya opened this issue 5 years ago • 4 comments

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.

akvaliya avatar Jan 07 '20 07:01 akvaliya

i wanna do the same, any solution ?

wahengchang avatar Feb 07 '20 10:02 wahengchang

same

jzfan avatar Apr 17 '20 14:04 jzfan

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()
        }
 }

rowanwins avatar May 03 '20 14:05 rowanwins

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:

  1. file-added
  2. error
  3. remove-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?

bigsee avatar Jun 17 '22 06:06 bigsee