Giter Site home page Giter Site logo

Comments (7)

sconix avatar sconix commented on August 16, 2024

You need to check dropzone documentation. All events and dropzone object are exposed.

from ngx-dropzone-wrapper.

rafaelss95 avatar rafaelss95 commented on August 16, 2024

I was facing the same "problem" today, so I found the following docs which points me to the right direction.

My config is the following:

public config: DropzoneConfigInterface = {
  // ...
  autoProcessQueue: false,
  init: function() {
    const dropzone: any = this;
    document.querySelector('button[type=submit]').addEventListener('click', (event: MouseEvent) => {
      event.preventDefault();
      event.stopPropagation();
      dropzone.processQueue();        
    });
};

from ngx-dropzone-wrapper.

sboyd avatar sboyd commented on August 16, 2024

@sconix thanks for writing this wrapper!

@rafaelss95 and anyone else who has this question the cleaner approach would be the following and they are using the component version.

@ViewChild(DropzoneComponent) componentRef: DropzoneComponent;

//process the queue
this.componentRef.directiveRef.dropzone.processQueue();

Then you don't need the workaround listed above.
--Steve

from ngx-dropzone-wrapper.

chenkie avatar chenkie commented on August 16, 2024

Quick edit to @sboyd's answer above, the snippet should be:

@ViewChild(DropzoneComponent) componentRef: DropzoneComponent;

this.componentRef.directiveRef.dropzone().processQueue();

This will get the dropzone instance.

from ngx-dropzone-wrapper.

sboyd avatar sboyd commented on August 16, 2024

@chenkie my guess is that it depends on the version of the wrapper you are using. I'm using version 4.x.x and the way I get the dropzone instance is what I'd posted in my comment. Now if you're using the same version of the wrapper I'm at a total loss :0)

from ngx-dropzone-wrapper.

chenkie avatar chenkie commented on August 16, 2024

Ah, I'm on v5. Thanks for clarifying :)

from ngx-dropzone-wrapper.

sboyd avatar sboyd commented on August 16, 2024

My bad....I should have stated that in the first place.
Have a great day.
--Steve

from ngx-dropzone-wrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.