Comments (7)
You need to check dropzone documentation. All events and dropzone object are exposed.
from ngx-dropzone-wrapper.
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.
@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.
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.
@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.
Ah, I'm on v5. Thanks for clarifying :)
from ngx-dropzone-wrapper.
My bad....I should have stated that in the first place.
Have a great day.
--Steve
from ngx-dropzone-wrapper.
Related Issues (20)
- version 9.0.0 Cannot read property 'kind' of undefined HOT 3
- New 5.6.0 version of dropzone causing build errors with all versions of ngx-dropzone-wrapper HOT 3
- Ngxs with dropzone
- Remove file link resets entire form HOT 1
- how to pass filename on parameter HOT 1
- orientation not working when uploading an image only in chrome browser. HOT 1
- how to stop the upload
- Unsupported DropzoneEvents
- Support for Angular 10 HOT 2
- DropzoneHeadersFunction action not working
- TypeError: dropzone__WEBPACK_IMPORTED_MODULE_1__ is not a constructor HOT 17
- addedFile/addedFiles missing from DropzoneConfigInterface?
- Images sent directly from mobile get rotated by 90 degrees. HOT 1
- Problem with ssr self is not defined HOT 6
- OnAddedFile event not fired in version 10.0.1 HOT 1
- Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries HOT 1
- Can't import the named export 'CommonModule' from non EcmaScript module (only default export is available) HOT 1
- Generic type 'eeDirectiveDeclaration' HOT 1
- How to overwrite the confirm function?
- Action Delete Image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-dropzone-wrapper.