Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
189
rated 0 times [  190] [ 1]  / answers: 1 / hits: 27266  / 9 Years ago, wed, april 8, 2015, 12:00:00

I use jQuery to work with dropzone. e.g.



$(#mydropzone).dropzone({ /*options*/ });


I need to get the Dropzone instance so I can call this method:



myDropzone.processQueue()


How can I achieve this?
Is it possible?



in other words, how can I initialise drop zone using



$(#mydropzone).dropzone({ url: /file/post });


but at the same time get the instance of the object as if i initialise it using:



var myDropzone = new Dropzone(#mydropzone, { url: /file/post});


so I may call:



myDropzone.processQueue()


Thank you very much.


More From » jquery

 Answers
103

The script seems to add a dropzone object to the given element.
So you can do something like this :



var $dropZone = $(#mydropzone).dropzone({ /*options*/ });
// ...
$dropZone[0].dropzone.processQueue();

[#67150] Monday, April 6, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kinsleyashlynnh

Total Points: 64
Total Questions: 119
Total Answers: 98

Location: Burundi
Member since Sat, Aug 21, 2021
3 Years ago
;