Skip to content
Discussion options

You must be logged in to vote
    this.dropZone.on("complete", file => {
      this.dropZone.files = without(this.dropZone.files, file);
    })

Background: Looking at the removeFile method

 removeFile(file) {
    if (file.status === Dropzone.UPLOADING) {
      this.cancelUpload(file);
    }
    this.files = without(this.files, file);

    this.emit("removedfile", file);
    if (this.files.length === 0) {
      return this.emit("reset");
    }
  }

I'm trying to essentially remove the file but keep the visual thumbnail. I'm responding to on complete, so the status should never be uploading. If I emit removedFiles, the callback removes the preview element here.

        removedfile: function removedfile(file) {
        …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by leenyburger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant