Skip to content

removeAllFiles Doesn't work in manuallyAddFile #133

Open
@guyver-dash

Description

@guyver-dash

I have managed to add files manually...

for(let i=0; i <= response.data.images.length - 1; i++){
              
              var img = new Image();
              img.onload = function() {}
              img.src = vm.windowLocation + response.data.images[i].path;

               var mockFile = {
                  id: response.data.images[i].id,
                  name: response.data.images[i].name,
                  size: response.data.images[i].size
                };

              var fileUrl = img.src
              vm.$refs.myVueDropzone.manuallyAddFile(mockFile, fileUrl)
            }

My Html for removing looks like this...
<button @click="ClearExample($event)">Clear</button>

My methods:

ClearExample(e){
         e.preventDefault()
         console.log('asdf');
         console.log(this.$refs.myVueDropzone)
         this.$refs.myVueDropzone.removeAllFiles();
      }

I can console log the asdf and myVueDropzone . I can also see the .removeAllFiles function see screenshot but it doesn't work. Any idea? Thanks..
capture

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions