I've just recently started using meteor.
I can't seem to wrap my head around how to properly load and use 3rd party JavaScript libraries.
I am trying to implement a file upload form with the help of some 3rd parties. I want something like DropzoneJS or jQuery Multiple File Upload to handle file selection, while Ink File Picker stores the files in the cloud.
The problem is that the libraries don't react when I try to use them. I can see in the browser that the library gets loaded, and the console is not showing any errors.
Example with DropzoneJS:
JS:
Template.frontpage.rendered = function () {
$('#dropzone').dropzone({ url: '/file/post' });
}
HTML in the frontpage template:
<form id="dropzone"></form>
This results when inspecting:
<form id="dropzone" class="MultiFile-intercepted dz-clickable"></form>
Something is happening, but the form is not being visually rendered at all.
I place the libs in the /client/libs directory. As some have suggested, I've also tried placing them in /client/compatibility.
I have also tried the Dropzonejs meteorite package with no difference.
What am I doing wrong? How can I make libraries like these function properly in Meteor?